Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Numerical Laplace transform

Subject: Numerical Laplace transform

From: Sven Gerich

Date: 1 Apr, 2013 19:30:14

Message: 1 of 14

Hello,
let's say we have a vector of y-values belonging to some x values. So y is some function of x. We don't have an analytic/symbolic expression for this function and are not interested in that either. Is there a (fast) method to Laplace transform this y-vector numerically like DFT/FFT with Fourier transform? I know there is a method in the matlab symbolic toolbox but suppose we don't know the explicit function (and do not want to interpolate it somehow).
Best,
Sven

Subject: Numerical Laplace transform

From: Sven Gerich

Date: 3 Apr, 2013 19:33:06

Message: 2 of 14

So, in short:
Can I do a Laplace transform with Matlab numerically?

Subject: Numerical Laplace transform

From: Josh Meyer

Date: 3 Apr, 2013 19:49:52

Message: 3 of 14

Check the discussion on this topic in this old thread for some useful
information:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/49893

In short, there is not a MATLAB function for numeric Laplacian transforms.

"Sven Gerich" <sven23358@hotmail.com> wrote in message
news:kji05i$80s$1@newscl01ah.mathworks.com...
> So, in short:
> Can I do a Laplace transform with Matlab numerically?

Subject: Numerical Laplace transform

From: Sven Gerich

Date: 3 Apr, 2013 22:00:06

Message: 4 of 14

Hi,
isn't that discussion about the inverse Laplace transform?


"Josh Meyer" <jmeyer@mathworks.com> wrote in message <kji152$b2t$1@newscl01ah.mathworks.com>...
> Check the discussion on this topic in this old thread for some useful
> information:
> http://www.mathworks.com/matlabcentral/newsreader/view_thread/49893
>
> In short, there is not a MATLAB function for numeric Laplacian transforms.
>
> "Sven Gerich" <sven23358@hotmail.com> wrote in message
> news:kji05i$80s$1@newscl01ah.mathworks.com...
> > So, in short:
> > Can I do a Laplace transform with Matlab numerically?

Subject: Numerical Laplace transform

From: anyone

Date: 4 Apr, 2013 01:11:23

Message: 5 of 14

On Wed, 03 Apr 2013 15:49:52 -0400, Josh Meyer wrote:

> Check the discussion on this topic in this old thread for some useful
> information:
> http://www.mathworks.com/matlabcentral/newsreader/view_thread/49893
>
> In short, there is not a MATLAB function for numeric Laplacian
> transforms.

Laplacian <> Laplace Transform

"Laplacian" is an operator (or 'mathematic operation'), not a transform.

>
> "Sven Gerich" <sven23358@hotmail.com> wrote in message
> news:kji05i$80s$1@newscl01ah.mathworks.com...
>> So, in short:
>> Can I do a Laplace transform with Matlab numerically?

Subject: Numerical Laplace transform

From: Josh Meyer

Date: 4 Apr, 2013 12:58:52

Message: 6 of 14

Indeed it is, my mistake for overlooking that.

The discrete version of the Laplace transform is called the Z-transform.

"Sven Gerich" <sven23358@hotmail.com> wrote in message
news:kji8p6$611$1@newscl01ah.mathworks.com...
> Hi,
> isn't that discussion about the inverse Laplace transform?
>
>
> "Josh Meyer" <jmeyer@mathworks.com> wrote in message
> <kji152$b2t$1@newscl01ah.mathworks.com>...
>> Check the discussion on this topic in this old thread for some useful
>> information:
>> http://www.mathworks.com/matlabcentral/newsreader/view_thread/49893
>>
>> In short, there is not a MATLAB function for numeric Laplacian
>> transforms.
>>
>> "Sven Gerich" <sven23358@hotmail.com> wrote in message
>> news:kji05i$80s$1@newscl01ah.mathworks.com...
>> > So, in short:
>> > Can I do a Laplace transform with Matlab numerically?

Subject: Numerical Laplace transform

From: Sas

Date: 4 Apr, 2013 15:39:07

Message: 7 of 14

"Josh Meyer" <jmeyer@mathworks.com> wrote in message <kjjteg$qk8$1@newscl01ah.mathworks.com>...
>
> The discrete version of the Laplace transform is called the Z-transform.
>
Discrete version of the Laplace transform is not a numerical version of the Laplace transform. Z-transform like Laplace transform can be both analytical and numerical.

Subject: Numerical Laplace transform

From: Sven Gerich

Date: 7 Apr, 2013 15:06:07

Message: 8 of 14

"Sas" wrote in message <kjk6qr$4c$1@newscl01ah.mathworks.com>...
> "Josh Meyer" <jmeyer@mathworks.com> wrote in message <kjjteg$qk8$1@newscl01ah.mathworks.com>...
> >
> > The discrete version of the Laplace transform is called the Z-transform.
> >
> Discrete version of the Laplace transform is not a numerical version of the Laplace transform. Z-transform like Laplace transform can be both analytical and numerical.

I know that. But isn't the command ztrans also *symbolic*?

Subject: Numerical Laplace transform

From: Sas

Date: 7 Apr, 2013 19:18:10

Message: 9 of 14

"Sven Gerich" wrote in message <kjs20v$79h$1@newscl01ah.mathworks.com>...
> "Sas" wrote in message <kjk6qr$4c$1@newscl01ah.mathworks.com>...
> > "Josh Meyer" <jmeyer@mathworks.com> wrote in message <kjjteg$qk8$1@newscl01ah.mathworks.com>...
> > >
> > > The discrete version of the Laplace transform is called the Z-transform.
> > >
> > Discrete version of the Laplace transform is not a numerical version of the Laplace transform. Z-transform like Laplace transform can be both analytical and numerical.
>
> I know that. But isn't the command ztrans also *symbolic*?

That's right, it's only symbolic.
I guess Matlab has no numerical version of the command.

Subject: Numerical Laplace transform

From: Sas

Date: 7 Apr, 2013 20:35:12

Message: 10 of 14

The numerical version seems can be implemented. But how? Here is the code that should be doing it but for some reason does not do it. Or rather does but wrong.

% Constants
sample_time = 0.1;
FFT_length = 128;
sigma_max = 2;

% Example: data, time
sys = tf(1, [1 3 4 2]);
time = 0 : sample_time : 10;
[data, time] = impulse(sys, time); % Control System Toolbox
figure;
plot(time, data);
xlabel('Time (s)'); ylabel('Data');

% Transform
dsigma = sigma_max / 100;
%sigma = -sigma_max : dsigma : sigma_max;
sigma = -sigma_max : dsigma : 0;
s_domain = zeros(FFT_length + 1, numel(sigma));
for i = 1 : numel(sigma)
    data_i = data .* exp(sigma(i) * time);
    [Pxx, f] = periodogram(data_i, [], FFT_length, 1 / sample_time);
    Pxx(1) = Pxx(1) * 2;
    Pxx(end) = Pxx(end) * 2;
    s_domain(:, i) = [flipud(Pxx); Pxx(2:end)];
end

% Results
f = [-flipud(f); f(2:end)];
figure;
surf(sigma, f, s_domain, 'EdgeColor','none');
rotate3d on;
figure;
surf(sigma, f, (20*log10(s_domain)), 'EdgeColor','none');
title('S-plane');
rotate3d on;
xlabel('Sigma'); ylabel('Frequency (Hz)'); zlabel('Power in s-domain (dB)');

Subject: Numerical Laplace transform

From: Sven Gerich

Date: 9 Apr, 2013 18:57:06

Message: 11 of 14

Your sigma is supposed to be complex.

Subject: Numerical Laplace transform

From: Sas

Date: 23 May, 2013 09:10:10

Message: 12 of 14

"Sven Gerich" wrote in message <kk1oa2$nei$1@newscl01ah.mathworks.com>...
> Your sigma is supposed to be complex.
Why and how?

Subject: Numerical Laplace transform

From: Sven Gerich

Date: 6 Jun, 2013 13:34:10

Message: 13 of 14

"Sas" wrote in message <knkmdi$sm2$1@newscl01ah.mathworks.com>...
> "Sven Gerich" wrote in message <kk1oa2$nei$1@newscl01ah.mathworks.com>...
> > Your sigma is supposed to be complex.
> Why and how?

That's because the Laplace transform is defined that way:
http://en.wikipedia.org/wiki/Laplace_transform#Formal_definition

Subject: Numerical Laplace transform

From: Sven Gerich

Date: 6 Jun, 2013 13:36:09

Message: 14 of 14

"Sas" wrote in message <knkmdi$sm2$1@newscl01ah.mathworks.com>...
> "Sven Gerich" wrote in message <kk1oa2$nei$1@newscl01ah.mathworks.com>...
> > Your sigma is supposed to be complex.
> Why and how?

Here's another script, doesn't seem to work though:
http://www.gomatlab.de/viewtopic,p,115634.html#115634

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us