Proper Implementation of Transfer Function

2 views (last 30 days)
Zachary Rago
Zachary Rago on 21 Feb 2022
Edited: vidyesh on 11 Oct 2023
So I'm following this example here:
Trying to create a quarter car simulation. As far as I can tell my transfer function is correct but clearly the simulation is not resulting as it should.
Is my block diagram laid out incorrect.
(I know this would be easier with integrators but I want to use the transfer function as it is a requirment for this project)
clc;
close all;
clear;
m1=290;
m2=15;
k1=16200;
k2=191000;
c1=1000;
c2=2500;
zs4 = m1*m2;
zs3 = m1*c2+m1*c1+m2*c1;
zs2 = m1*k2+m1*k1+c1*c2+m2*k1;
zs = c1*k2+c2*k1;
z_ = k1+k2;
us2 = c1*c2;
us = c1*k2+c2*k1;
u_ = k1+k2;
den = [zs4,zs3,zs2,zs,z_];
num = [us2,us,u_];
z_u = tf(num,den)

Answers (1)

vidyesh
vidyesh on 11 Oct 2023
Edited: vidyesh on 11 Oct 2023
Hi Zachary Rago,
I understand that you want to know why your signal graph differs from the one provided in the source link you shared.
It appears that the values of 'z_' and 'u_' are being calculated incorrectly. To rectify this, I suggest substituting the following lines in your code for calculating 'z_' and 'u_':
z_ = k1*k2;
u_ = k1*k2;
Additionally, it is unclear from the diagram which block is being used to represent 'num/den'. To clarify this, I recommend using the 'Transfer Fcn' block.
Hope my answer helps.

Categories

Find more on Simulink in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!