Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert Fractional DD to discrete? #10

Open
cnpcshangbo opened this issue Feb 28, 2018 · 9 comments
Open

How to convert Fractional DD to discrete? #10

cnpcshangbo opened this issue Feb 28, 2018 · 9 comments

Comments

@cnpcshangbo
Copy link
Owner

Finally, we found the reason. I used Fractional DD block in the simulator, however, it is a continuous block, I need to change it to discrete block. Here is what we did:
image
image
I added a new Edit to enter sampling period(Ts).
image
Then I added a c2d command to change the transfer function to discrete.

@cnpcshangbo
Copy link
Owner Author

image
So we can input the sampling period.

@cnpcshangbo
Copy link
Owner Author

We still need to change the transfer function to discrete transfer function.
image

@cnpcshangbo
Copy link
Owner Author

Two rate transitions need to be added.
image

@cnpcshangbo
Copy link
Owner Author

Then we got some error.

Simulation 1 Clear
01:11 PM Elapsed: 27 sec
Model Reference
Elapsed: 0.12 sec
An error occurred while running the simulation and the simulation was terminated
Caused by:
['Quadrotor_Controller/Actuation/Solver Configuration']: Error evaluating equations at time 6.9925000000000006. Stopping simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
['Quadrotor_Controller/External Force/6-DOF Joint']: 'Quadrotor_Controller/External Force/6-DOF Joint' has a degenerate mass distribution on its follower side.
Component:Simulink | Category:Block error

@cnpcshangbo
Copy link
Owner Author

Then I reduced the sampling period to 0.05 sec. It has the oscillation like this:
image

@cnpcshangbo
Copy link
Owner Author

cnpcshangbo commented Feb 28, 2018

Then I tried to reduce the loop gain by half.
image
image

@cnpcshangbo
Copy link
Owner Author

Then I tried to multiply 0.05 instead of 0.5 for the FOPD controller gain.
image

@cnpcshangbo
Copy link
Owner Author

image
It still has similar behavior. Then I need to try getting the sampling period larger.

@cnpcshangbo
Copy link
Owner Author

image
The behavior is similar. I guess I also need to discrete the integer order part?
I'll try to see what will happen when I comment out the Fractional DD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant