I would like to solve the following equation for the magnitude and phase of vo
vo = vi * ( r / ( r + (1/j*w*c)))
The problem is, I do not know how to specify that r, w and c have only real parts while vi is a complex number with a magnitude of vi and a phase of phi.
I have tried using real(r), real(w) etc. in the calculations however the calculation of the magnitude using abs() does not give me the desired answer.
>>syms vo vi r w c //FIRST METHOD//>>vo=vi*(r/(r+(1/(j*w*c))))vo =(r*vi)/(r - 1i/(c*w))>>abs(vo)ans =abs(r*vi)/abs(r - 1i/(c*w)) <--- magnitude contains imaginary number which i would like to be removed (included in the calculation)>>syms vo vi r w c //SECOND METHOD//>>vo = vi * real (r) / ( real(r) + 1/(j*real(c)*real(w)))vo =(vi*real(r))/(real(r) - 1i/(real(c)*real(w)))>>abs(vo)ans =abs(vi*real(r))/abs(real(r) - 1i/(real(c)*real(w)))
Note that I would like to obtain the following expression: Assuming that vim is the magnitude of vi
abs(vo) = vim / ( 1+(1/r*w*c)^2)^(1/2)
angle(vo) = phi + atan2d(1/r*w*c)
Best Answer