Embarrassing Laplace question using ilaplace
    7 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
I always get stuck using ilaplace And then 6 months goes by and i get stuck again because i don't use it often enough
Im just trying to plot the step response of a first order system using the step command which works fine as always. Just for kicks i want to take the same function take the inverse laplace function and plot it against t manually They should yield the EXACT same answer but yet it doesn't.
Can anyone see my mistake?
clear all
clc
syms R C S
R = linspace(1,10000,5);
C = .0001;
for r = 1:5
      Vout_in_t = ilaplace(5/(R(r)*C*S+1))
      ezplot(Vout_in_t,[0,2])
      hold on
      my = tf([1], [1 1/(R(r)*C)])
      figure
      opt = stepDataOptions
      opt.StepAmplitude = 5
      step(my,opt)
      hold on
  end
0 Commenti
Risposte (2)
  Jyotish Robin
    
 il 20 Gen 2017
        
      Modificato: Jyotish Robin
    
 il 20 Gen 2017
  
      Hi Robert,
From the given code , what I understood is that the transfer function you are trying to use is the one below:
S/(1+RCS)
In that case , you have to rewrite the line which defines your transfer function as:
>>my = tf([1 0], [(R(r)*C) 1])
Hope this helps!
0 Commenti
  Star Strider
      
      
 il 20 Gen 2017
        If you want to see the response to the step input, you need to convolve it with the Laplace transform of the unit step, (1/s).
See if this does what you want:
syms R C s 
R = linspace(1,10000,5);
C = .0001;
for r = 1:5
    Vout_in_t = ilaplace(5/(R(r)*C*s+1) * 1/s)
    ezplot(Vout_in_t,[0,2])
    hold on
      my = tf([1], [1 1/(R(r)*C)])
      figure
      opt = stepDataOptions
      opt.StepAmplitude = 5
      step(my,opt)
  end
  hold off
0 Commenti
Vedere anche
Categorie
				Scopri di più su Calculus in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


