Properties of Laplace Transform in MATLAB

Hey fellows, in the previous lecture, we read the basics of Laplace transform and now, we want to go into a deep study about the same topic. Usually, it is important to learn all the properties of a mathematical tool to use it well, but we’ll focus on the basic and important properties of the Laplace transform to understand its concepts. Here are these:

  • Linearity

  • Time delay

  • Nth derivative

  • Frequency shifting

  • Multiplication with time

  • Complex shift property

  • Convolution of the Laplace transform

  • Time shifting

  • Time reversal

If you have read the previous concepts clearly, then these concepts should be clear in your mind. We’ll define all of them one after the other, and you'll understand each of them clearly.

Linearity in the Laplace Transform

We all know what linearity is. Yet, the linearity of the Laplace transform is slightly different. When we apply the Laplace transform to two functions that are multiplied with a constant value, say a and b, then the result obtained is equal to the addition of these Laplace entries and multiplying the respective constant with it. In short, we can say:

“Adding two or more values and applying the Laplace transform does not have any change in the result, but we get the linear output.”

This can be illustrated clearly with the following mathematical representation:

You must keep in mind that no matter how many entries you add, the result will always remain linear.

Time Delay of Laplace Transform

Laplace equation A time delayed function's transform is the function's Laplace Transform multiplied by e-as, where an is the time delay. We frequently investigate systems as a function of frequency.


One must keep in mind that to apply this property, we multiply the delayed version of a function with a delayed step. For instance,

If 

Original function= g(t)·γ(t)

Then

Shifted function= g(t-td)·γ(t-td) 

If 

td=time delay


Nth Derivative of Laplace Transform

When taking the derivative of the Laplace to transform, there is a long procedure. It is stated as follows:

There is a long calculation of the whole statement, but after that, the result follows the formula given below:

So, you do not have to take care of each and every value of a long calculation, simply follow this formula and put the values in it, and you can find the derivative of any degree when dealing with the Laplace Transform. 

In some other places, the 1st and 2nd derivatives of the Laplace transform are also discussed as properties, but the key point is, that you can put any value of n in the formula given above and get the required results. We have not mentioned them to make things simple.

Frequency Shifting Property

The frequency shifting property of the Laplace transform is described as

es0t f(t)) ⟷ F(s – s0)

The result on the left-hand side describes the shift of the Laplace transform. 

Multiplication of Time in the Laplace Transform

When multiplying the Laplace transform with the time T, the result obtained is:

T f(t) ⟷ (−d F(s)⁄ds)

Complex Shift Property 

When dealing with the complex number and the Laplace transform, one must keep the following statement in your mind:

f(t) e−at ⟷ F(s + a)

Convolution of the Laplace Transform

If you are following our previous series, then you must know what the meaning of this property is. Yet, we can revise it. Convolution is the method in which two signals are folded onto one another in such a way that they produce a third signal. The same is the case with the Laplace transform.

When two functions of the Laplace transform in the time domain are convoluted, we get results that have the multiplication of them within the frequency domain.

As we have read about convolution in the previous two lectures, you can get an idea of how you can check this property. To save time, you can also check it in MATLAB. You just have to follow these steps:

  • Go to MATLAB.

  • Write the code for the Laplace transform of the first statement by using the function. 

  • Repeat the same procedure with the other statement. 

  • Write the code of convolution of the results as we have done previously. 

  • Output the results. 

Time scaling

Time scaling is a basic property of signals, and when we talk about the Laplace transform, we get to know that after scaling, the variable a from the denominator is shifted into the multiplication; that is, we get the time signal in the frequency domain. 

The Step Function of the Laplace Transform

Here is another thing about the Laplace transform. The step function is defined when we use the function of the following form:

u(t) = ( 0 for t < 0,

           1 for t > 0)

This statement shows that for the values between 0 and 1, this statement is also known as the Heaviside function. 

Inverse Laplace Transform

As you can guess from the name, the Laplace transform can be inverted, and this procedure is called the inverse transform. Once you transform the function from the time domain to the frequency domain (that's what the Laplace transform does), you can simply invert the whole process by using the inverse Laplace and get the result in the time domain again. This technique is useful in a number of applications of the Laplace transform. It is represented as:

f(t) = L-1{F(s)}

Now coming towards the solution to this transform. While checking the table, you can easily find the inverse transform. However, if the solution or the term is not present in the table, you can find this inverse with the help of the partial fraction expansion method. 

Inverse Laplace in MATLAB

As in the previous case, inverse Laplace is also performed in MATLAB with the help of functions. Here is the simplest example of this function. Suppose we want to perform the inverse transform of the code that we have discussed before.

Code:

syms t s;

ilaplace(exp(3*t)/(s+13)*(s-2))

Output:

All the descriptions are the same as in the previous case, but you can see we used a slightly different function as

ilaplace(x)

Where x is the value of the question that we have fed into this function. Finally, have a look at the code given next in which I just have merged Laplace transform with the inverse Laplace so that you may understand the whole mechanism. 

Code:

syms t a s;

f=exp(a*t) %Question

F=laplace(f) %Laplace Transform

G=ilaplace(f) %Inverse Laplace Transform

Output:

Here, a new thing is introduced in our program that may be new to you. We used the comments and these can be added to any program of MATLAB same as the other programming languages. 

What are comments in a programming language?

Comments in the programming languages are ignored by the compiler at compile time. In other words, we can not add any extra words in programming languages because the compiler does not understand them and we risk an error. So, if a person wants to add details about the steps or wants to add any notes, he or she uses the comments. The compiler then ignores these lines, and in this way, we do not get any errors. Usually, comments are shown in a different color than the code lines (green in MATLAB). To add comments in the program, we simply put a percentage sign % before the notes. 

Partial Fraction Expansion and Inverse Laplace Transform

As we have all learned in our matriculation, the partial fraction is the method in which the difficult denominator is solved by converting it into different partial fractions. In this way, it becomes easy to find the values of variables, and after that, the result is recollected into the desired form. 

There are different cases in the partial fraction of the Laplace transform and some of them are given next:

  • Direct real roots

  • Repeated real roots

  • Complex roots

  • Order of numerator and denominator are equal.

  • Exponential in the numerator


Now, you must be thinking about how inverse Laplace can be used as a partial fraction. Let's have a simple example in which you will learn to solve this case. 

Consider the following question:


F(s)= s^2 +3/s^2(s+2)


You have to follow the steps given next:

  • Write the right-hand side part of this equation on the left side of the equal sign and mark it as X.

  • At the right side of the equal sign, you have to split the denominator. Here, you can see that there will be three fractions when we split the denominator. These are:

  1. s^2

  2. s+2

  • The numerator is ignored at this point, and you have to put A, B, and C on each numerator of the partial fraction. 

  • Now, simply multiply s with the whole equation and solve them one after the other. 

  • Cancel the values as much as possible.

  • Solve the equation. 

  • Repeat the previous four steps by placing the 2nd and 3rd denominator values. 

  • You will find the values of A, B, and C.

  • Put the values in equation X and this is the required answer. 


This explanation is just for revision, otherwise, we all know the implementation of a partial fraction.

Partial Fraction and Laplace Transform in MATLAB

As you were expecting, MATLAB has the implementation of fractions in just a second. You do not have to do long conversions. Simply put the code in MATLAB and you will get accurate and easy answers in just a second. 

Suppose we have the question:

F(s)=(4s+24s^22+48^3)/(s+4)(s+1)(s+2)

Then you will use the following code.

Code:

num=[4,24,48]

roots1=[-4 1 2]

den=poly(roots1);

[r,k]=residue(num,den)


Output:

Here, you can see that we have used a different type of code that till now we have not discussed. So have a look at the description given next:

  • The term "num" describes the values in the numerator. 

  • The den represents the entries of the denominator. 

  • We used the poly(x) function in which x represents the value that has to be converted into polynomial form. 

  • Here in the place of x, we inserted the values that, before calling it, we stored in the user-defined variable roots1. It was named by us, but you can call it by any other name. 

  • [r,k] = residue (num, den) is the pre-defined function of MATLAB in which we find the values of the variables that we have shown by storing them in num and den. 

  • Always keep in mind that the values that we have stored in the den are the values when we put the s-x=0, the sign of each value is reversed. Moreover, never change the sequence of the numerator or denominator in the pre-defined function otherwise, you will get different results. 

Applications of the Laplace Transform

Have a quick review of the Laplace transform here:

Data mining

In data mining, there is a great role for databases and records of previous values. The laplace transform plays an important role there and helps to keep the record in a great way. 

Signal processing

All the conversation about the Laplace transform was based upon the application of this transform in signal processing. It is used in the filtering of signals, processing of signals, and changing the domain of the signals.

Control system

This transform is used to convert the governing complex equations into simple differential equations. 

Probability

Not only in probability, but it is also used in the moment and variance as well. It is a necessary topic in most mathematical courses. 

Integrated system

In computer ICs, the Laplace transform is used to measure and predict the current and other parameters in a great way. Therefore, it is used in the designing of ICs and delicate circuits in a great way.

Today we have seen some interesting facts about the Laplace transform and read thoroughly about the properties and types of Laplace transforms. We used MATLAB for examples, and we also found the working of this transform in detail. In the end, we have a glance at some basic and simple applications of Laplace transforms.

Data security engineer advice for regular Internet users

We've all heard that clicking on links or attachments can lead to identity theft of sensitive, personal information. And while it's true - if you're not careful, you could be leaving yourself open to hackers and other dangers. But what most people might not know is the difference between "hacking" and "data theft". In this post, we outline the steps data security engineers recommend you take to protect yourself from these different types of threats.

What do data security engineers recommend for people who don't work in security?

Data security engineers are not your everyday IT professionals, so what do they recommend for parts of the population who aren't working in IT?


Step 1: Don't breeze through sites with suspicious links or attachments.

While some advice might be obvious - if you're on a secure, encrypted site, for example - for regular Internet users, data security engineers often urge people to take this one step further. In general, we suggest that individuals don't just treat a website as secure if they can't see that the website is encrypted with HTTPS , but instead assume encryption is there unless it's explicitly said otherwise.

What this means for you as a regular Internet user is that before you click on a link, you should pause and consider if the destination is where it says it's going to take you. If in doubt, search for the destination site to find out where it lives, then visit the site from there instead of clicking the link.

Step 2: Use two-factor authentication whenever possible.

Two-factor authentication adds an extra layer of security in addition to your password by asking for another "factor" to activate your account - most commonly, a number sent either via text message or generated by an app on your smartphone.

Using two-factor authentication, you get maximum protection of your data in your account, protecting yourself from both hackers who have your password and malicious advice that directs you to a fake login page. And once you're there, using two-factor authentication can stop attackers from taking over your account entirely.

Step 3: Update and patch applications

Computer security is a constant battle between developers on one side who are trying to make their applications as secure as possible and attackers on the other who are trying to exploit flaws in those applications. To keep up with the latest patches, developers recommend that users keep their software up to date with the latest versions - either automatically or manually.

Users also have a choice to control which applications automatically update. To stop them from installing unwanted software, users can opt out of automatic updates through their OS's control panel. And to ensure the latest security updates from their developer, developers recommend that users always install updates when told.

Step 4: Update your browser with new and fresh security features.

Since browsers are the foundation on which websites are built, regular Internet users need to keep their browsers current with the latest patches, features, and security fixes. And that means staying up to date.

For users who find themselves caught in an old browser, or for those who might have trouble keeping track of updates, developers recommend taking advantage of automatic browser updates . Then, when updates are available, the browser will notify you and you can update from there. With automatic patches and feature updates, your browser will ensure you're always current with the latest security features to protect your devices and information.

Step 5: Make good, informed decisions about what you share online.

With all the benefits of social networking and sharing, it's easy to feel comfortable sharing each other's information with a promise of trust.

  •  For regular Internet users putting personal information online for others to see, data security engineers think it's important to make sure that when you do share your information online, you're doing so for the right reasons.

  • The deciding factor here is whether or not you have control over the information and how to delete it from the site when you decide later that you don't want it there anymore. 

  • If you do have control over the information and can delete it from that site, then data security engineers don't see any harm in sharing.

If you don't have control over the information though and aren't allowed to delete it, then data security engineers think it's important to consider other ways of getting your point across - perhaps by taking a picture with your smartphone and posting that online, rather than posting another selfie or a picture of your cat.

Step 6: Encrypt your devices.

Regular Internet users who are constantly using smartphones and tablets are not only making themselves vulnerable to hackers when they're out in public but also at home with their devices. And data security engineers suggest that if users aren't already encrypting their devices, it might be time to start.

Locking an Android device with a password gives users a greater layer of protection over their phones and tablets. Encrypting laptops and desktops can also prevent someone in the same household from accessing your devices. And data security engineers recommend making encryption automatic for all of your cloud storage services like Dropbox and Google Drive since this makes recovery much easier should something go wrong.

Step 7: Be smarter about the apps you install.

While most mobile apps are smaller and more focused than larger software systems, it's still important for regular Internet users to choose the ones that offer security features over those that don't. And for those that do offer features, it's important to make sure they're useful and useful only in your specific situation.

Data security engineers suggest taking a look at reviews of any apps you're considering installing first - both those that are free and paid. Just because an app looks like something you might want isn't always the best reason to install it. After all, what good is an app that can protect security if it can't protect your information?

And finally...

These steps should keep your online information and devices secure. But sometimes, no matter how prepared you are, problems can still happen. For those times when things do go wrong, data security engineers suggest taking a look at cyber liability insurance. So long as you're not violating the terms of service of any sites or apps that you might use - or ignoring the advice of data security engineers - then your policy should protect you if something happens.

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir