vector to sys transformation for bode plot
Mostra commenti meno recenti
Hi,
As background, I am trying to use the bode() function.
I know that you can extract vectors from a bode(sys) by doing
[mag phase wout] = bode(sys)
but if i have a vector c, can i turn that into a sys and then do a bode?
Although I think this doesn't really make sense because the vector c does not carry enough information to be in the 'sys' form, but my goal is to divide something that is 'sys' with c. However, Matlab doesn't seem to like this and gives the following error.
??? Error using ==> DynamicSystem.mrdivide at 58
In "SYS1/SYS2", the LTI model SYS2 must have the same number of inputs as
outputs.
How can i resolve this issue such that i can perform the function 'sys' (a transfer function) divided by c (a vector)?
Risposta accettata
Più risposte (1)
lounis chehrit
il 8 Giu 2021
0 voti
Hello guys:
I have two signal column vectors ( input and output ) : ( very large but they both have the same size):
x_inp=[0.0001, -0.0233, ..... ]
x_out=[0.005, -0.0053, ..... ]
i also have a system TF, which is represented like this:
Real( H(s) ) = 23 cos (2*pi*s) + 12 cos (5*pi*s/10) + 1 cos (2*pi*s)/19 + 0.75 cos (5*pi*s/10).
Imag( H(s) ) =11 sin (3*pi*s) + 7 cos (9*pi*vs2) + 10 sin (2*pi*s)/2 + 1.25 sin (4*pi*s/18).
I want to know if , TF( x_out / x_inp ) = H(s).
I tried this :
sys = Real( H(s) ) + i.* Imag (H(s) ).
so to compute the TF( x_out / x_inp ) i did this :
TL1 = tf ( x_inp )
TL2 = tf ( x_out).
and then :
signal = TL2 ./ TL1.
But it doesn't work.
Can anyone please, tell me how can i compute that tf and compare them to the H(s) system.
Or is there another method to see if TF( x_out / x_inp ) = H(s) ? Wether fft method or something like that.
Thank you in advance !
Categorie
Scopri di più su Response Computation and Visualization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!