how can i change the matrix block in Simulink?

1 次查看(过去 30 天)
i want to make a time-varying system by using Simulink.
And i wanna change the matrix block every loop in time-varying system.
i already know the time-varying matrix at every loop.
ex) M(t)x''+kx=F(t)
the time inverval is 1sec. and stop time is 5 sec.
t=0, M=[0 0;0 0];
t=1, M=[1 0;0 0];
t=2, M=[0 2;0 0];
t=3, M=[0 0;5 0];
t=4, M=[0 0;0 6];
t=5, M=[0 2;0 6];;
i just want to change the M matrix in the Gain block every loop.
or if there is another method to simulate the time-varying system, plz let me know.

回答(1 个)

Kaustubha Govind
Kaustubha Govind 2013-2-14
编辑:Kaustubha Govind 2013-2-14
Are you able to write M as a function of t? What happens to M when t>5? If you are able to write it as a function, implement it using basic Simulink blocks. If not, you can use the 2-D Lookup Table to specify values for 'M' for each breakpoint in 't'.
Once you have used either of these techniques to produce 'M', you can simply multiply it with your input using the Product block.
Also: This previous question has several tips for modeling differential equations in Simulink. You probably want to start there.

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by