cnpcshangbo / simscapeFOPD

Simscape drone altitude control with fractional order proportional derivate controller
Other
12 stars 5 forks source link

We need to do discrete simulation before using Simscape. #13

Open cnpcshangbo opened 6 years ago

cnpcshangbo commented 6 years ago

Discrete simulation needs to be done before using Simscape.

cnpcshangbo commented 6 years ago

image This is the continuous one. image

cnpcshangbo commented 6 years ago

Now, lets add some samplers(sample time=0.3sec) and see. image image

cnpcshangbo commented 6 years ago

From this, we know that the continuous controller doesn't work for the sample-based system. Therefore, we should do something to convert the transfer function to z transfer function.

cnpcshangbo commented 6 years ago

Later, I found even if I convert the transfer function to z transfer function, the control performance doesn't get better. The way to get it better is to get the sampling period smaller. image purple: Ts=0.3 blue: Ts=0.1

cnpcshangbo commented 6 years ago

FOPD Ts=0.1 image image

cnpcshangbo commented 6 years ago

Conclusion: FOPD discretization is verified. The thing to get performance better is to use smaller Ts. We do not need to manually use c2d. The system can treat continuous tf and z tf the same.

cnpcshangbo commented 6 years ago

The system still has a bad behavior. image I am going to verify the z domain stability.