Dissimilar transfer functions/state space models
조회 수: 2 (최근 30일)
I am currently trying to model a spring mass damper system in Simulink. One of the methods that I am employing is the calculation of transfer function (tf), getting the state space model (tf2ss) and finally use the matrices obtained for the state space block in Simulink.
The doubt which I am unable to resolve after thinking for a long time is that the matrices obtained from the state space models in Matlab differ from those which it should be. I referred to literature on the net and books for the State space matrices but the matrices differ from those found by Matlab and consequently leading to wrong results. The results of course have to match, calculated in any way.
I know it is not possible. The books and Matlab have to find the same thing but I am not able to figure out where I am going wrong. The fact that I am not exactly a control systems specialist is, I guess, some hindrance too.
I would greatly appreciate any help. It shouldn't be a tough problem, I am sure...but unfortunately I tried but am stuck.
Just for reference - I used the following parameters -
Mass - 0.1, damping constant - 0.5, spring constant = 40 (second order Transfer function).
Thanks a lot!
Gautham Sholingar 2017년 5월 15일
As far as I understand, you are attempting to compare the responses between the transfer function and state space implementations of a spring mass damper system and you are noticing a discrepancy in the calculated state space matrices.
1) Could you explain your full workflow? Are you looking at the step response between the transfer function and the state space model and getting different results? How did you conclude that the state space matrices were erroneous?
2) Could you share the expected state space matrices and the results you actually get?
3) Do you notice different results in Simulink vs. MATLAB?
4) Finally, a code snippet/model highlighting the above things would be very useful to help reproduce this issue. Some more information is needed to determine the specific nature of this issue.
Suhan 2017년 5월 22일
Hi Rajat, Perhaps you want to check if you are following the right method to obtain the state space model from the transfer function and vice-versa.Also, check if the transfer function that you have rightly models the mass-spring-damper system. For your reference, I have attached here a demonstration model 'transfer_ex '(created in R2016b) which compares the results of the state-space and transfer function models in Simulink using the blocks that you had mentioned. Please simulate this model and check the results in the scope. You would see the output of the two models matches very well. The definition of the transfer function for the given (parameters mentioned by you) mass-spring-damper system and the conversion to state-space-model is done in the model callbacks. You can have look at this in: open the model trnasfer_ex > File > Model Properties > Callbacks > InitFcn.
I hope you would find this article helpful.