How to chnage the coefficent for transfer function?

조회 수: 7 (최근 30일)
Shambaven Srimurugathas
Shambaven Srimurugathas 2024년 2월 4일
댓글: Sam Chak 2024년 2월 7일
How do I change the 'deng' coefficient where it shows (s+11.17)(s+10.89)(s^2+0.033s+0.553) at the end. Trying to figure out but been stuck. Let me the changes need to made ASAP:

답변 (3개)

Sam Chak
Sam Chak 2024년 2월 5일
편집: Sam Chak 2024년 2월 7일
I believe that the following result is probably what you are seeking.
Update 2: As per what you want.
numg = conv([1 0.37], [1 2.26]);
deng = [ 1, 22.093, 122.92228, 16.2133429, 67.2676389];
K = -8;
G = zpk(K*tf(numg, deng))
G = -8 (s+2.26) (s+0.37) ------------------------------------------ (s+11.17) (s+10.89) (s^2 + 0.033s + 0.553) Continuous-time zero/pole/gain model.
Update 1: There is probably a typo in the denominator in your original code.
numg = [-0.37, -2.26];
% deng = [ 1, 22.093, 122.92228, 16.2133429, 6.72676389]; % <-- there is probably a mistake here
deng = [ 1, 22.093, 122.92228, 16.2133429, 67.2676389];
K = -8;
% G = zpk(numg, deng, K)
G = zpk(K*tf(numg, deng))
G = 2.96 (s+6.108) ------------------------------------------ (s+11.17) (s+10.89) (s^2 + 0.033s + 0.553) Continuous-time zero/pole/gain model.
  댓글 수: 2
Shambaven Srimurugathas
Shambaven Srimurugathas 2024년 2월 7일
Thx for your help but the bottom dnominator coefficient is right but I want the top to show as -8(s+0.37)(s+2.26). If you know how to fix that I appreciate it.
Sam Chak
Sam Chak 2024년 2월 7일
Take a look at Update 2 above. If you find the solution helpful, please consider clicking 'Accept' ✔ on the answer and voting 👍 for it. Thanks a bunch! By the way, you should also vote for other helpful answers as tokens of appreciation.

댓글을 달려면 로그인하십시오.


Hassaan
Hassaan 2024년 2월 4일
% Define the coefficients for the denominator polynomial
deng = [1, 22.093, 122.92228, 16.2133429, 6.72676389];
% Assuming numg and K have been defined correctly as before
numg = [-0.37 -2.26];
K = -8;
% Create the zero-pole-gain model
G = zpk(numg, deng, K);
zpk with properties: Z: {[2×1 double]} P: {[5×1 double]} K: -8 DisplayFormat: 'roots' Variable: 's' IODelay: 0 InputDelay: 0 OutputDelay: 0 InputName: {''} InputUnit: {''} InputGroup: [1×1 struct] OutputName: {''} OutputUnit: {''} OutputGroup: [1×1 struct] Notes: [0×1 string] UserData: [] Name: '' Ts: 0 TimeUnit: 'seconds' SamplingGrid: [1×1 struct]
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.
  댓글 수: 2
Shambaven Srimurugathas
Shambaven Srimurugathas 2024년 2월 4일
Unfortunately its not what I want. I need to change the 'deng' coefficient say that (s+11.17)(s+10.89)(s^2+0.033s+0.553) when I run the code.

댓글을 달려면 로그인하십시오.


Star Strider
Star Strider 2024년 2월 4일
What do you want to change it to?
The displayed result is the format that the zpk function produces. If you want them otherwise, omit the zpk call, and just multiply the numerator by -8.
  댓글 수: 1
Walter Roberson
Walter Roberson 2024년 2월 4일
Or convert the zpk to a transfer function by using tf()

댓글을 달려면 로그인하십시오.

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by