How to do Z transform with Z^-1 format?
Show older comments
I want to do the Z transform of
which theoretically is
.
.However, Matlab's Z transform function (ztrans) gives it in Z format and not in Z^-1 format.
The equation that ztrans(f) gives me is:
.
.I want to know if there is a clean way to get the Z transform in Z^-1 format as shown above.
If the code is generic and not specific to this example will help a lot.
Accepted Answer
More Answers (2)
Vinit
on 2 Nov 2023
Edited: Walter Roberson
on 21 Jan 2024
clear all
close all
clc
V = 220;
R = 10;
L = 0.051;
dt = le-3;
t = 0:dt:0.05;
y = [0];
for k =1:length(t)-1
y (K+1)=(1-R*dt/L)*y(k)+dt*(1/L)*V;
end
figure(1)
plot(t,y)
grid on
xlabel ('time (s)')
ylabel ('current (Amp)')
Vinit
on 2 Nov 2023
Edited: Walter Roberson
on 21 Jan 2024
The solution of equation (5) & (8) is obtainedby using MATLABProgram to solve difference equations
%%Program to plot the difference equation to verify
%Results with time domain equations
%Considering the systemof RL Circuit
% The expression is V=Ri+L(di/dt) clear all
close all clc
%System Parameters
V=220; % Maximum valueof the voltage (Volt)
R=10; % Resistance Value(Ohm)
L=0.051; % Inductor value(Henry)
dt=1e-3; % Time period (T)
t=0:dt:0.05; % Samples, k
y=[0]; % Output stack
fork=1:length(t)-1
y(k+1)=(1-R*dt/L)*y(k)+dt*(1/L)*V; end
figure(1)plot(t,y) grid on
xlabel ('Time (s)') ylabel('Current(Amp)')
Categories
Find more on z-transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
