Open cnpcshangbo opened 6 years ago
So we can input the sampling period.
We still need to change the transfer function to discrete transfer function.
Two rate transitions need to be added.
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
Then I reduced the sampling period to 0.05 sec. It has the oscillation like this:
Then I tried to reduce the loop gain by half.
Then I tried to multiply 0.05 instead of 0.5 for the FOPD controller gain.
It still has similar behavior. Then I need to try getting the sampling period larger.
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.
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: I added a new Edit to enter sampling period(Ts). Then I added a c2d command to change the transfer function to discrete.