Linearization with a Constant Block in Matlab

In summary, linearization with a constant block in Matlab is a method of simplifying complex equations by breaking them down into smaller parts. This can be done using the built-in function "linmod" and offers benefits such as easier analysis and more accurate predictions. However, there are limitations to this method, such as potential inaccuracies and loss of information. It is most effective for equations that are close to being linear and should be carefully considered before use.
  • #1
ques
1
0
Hi All,

Homework Statement


I have modeled a simple spring mass system in Matlab and trying to use linmod to linearize the system.

The system models a mass that hangs from ceiling with a spring and damper. So, the forces that act on the mass are gravity, spring force and damping force. I attached the Simulink model and a picture of the model to the question.

Now, the problem is that, Matlab's linmod seems to completely ignore the gravity (constant block). I would like to know how should I change the model or simulation parameters to get correct results.

Homework Equations



state vector x is [h V]' (height and speed)
output vector y is [h a] (height and acceleration)
input vector is empty

linmod('trim_linmod_test') gives following matrices:

A:
0.0000 1.0000
-0.5000 -0.5000

C:
1.0000 0.0000
-0.5000 -0.5000

B,D empty because there are no inputs.

Now,

y= C*x, hence a = -0.5 * h - 0.5*V

On the other hand, if we simply look at the model we can see that
a = (-5*h - 5*V + 9.81) / (m) ( m = 0.1, the gain block )

So, obviously, the constant block is ignored.

The Attempt at a Solution


I can see that the state space equation of the form y=C*x can't really represent the gravity term. C is a 2x2 matrix but acceleration equation needs 3 terms.

I thought of making gravity an input. This way state space equation will be y = C*x + D*u and there are enough terms to represent acceleration. But this doesn't really look logical to me.Thanks in Advance
 

Attachments

  • trim_linmod_test.zip
    5.4 KB · Views: 165
  • trim_linmod_test.png
    trim_linmod_test.png
    8.2 KB · Views: 559
Physics news on Phys.org
  • #2
for any help!

Hello,

Thank you for sharing your question and providing a clear explanation of your problem. It seems that the issue lies in the way you are defining your state vector and output vector.

In your state vector, you have only included the height and speed of the mass, but not its acceleration. This is why the gravity term is being ignored in the linearization process. To fix this, you can redefine your state vector to include the acceleration as well: x = [h V a]'.

Similarly, in your output vector, you have only included the height and acceleration, but not the speed. This is why the output matrix C does not have a term for the speed. To fix this, you can redefine your output vector to include the speed as well: y = [h V a]'.

Once you make these changes, the linmod function should give you a correct representation of your system with all three terms (gravity, spring force, and damping force) included. I hope this helps. Good luck with your project!
 
  • #3

It appears that the issue with the linearization using linmod in Matlab lies in the fact that the constant block representing gravity is not being taken into account. This could be due to the fact that the state space equation y=C*x cannot accurately represent the gravity term, as it only has two terms when the acceleration equation requires three. One potential solution could be to make gravity an input in the system, so that the state space equation becomes y=C*x + D*u, allowing for enough terms to accurately represent acceleration. However, this may not be the most logical approach. Alternatively, you could try using a different method or tool for linearization, or manually calculate the state space equations to include the gravity term. It may also be helpful to consult with other experts or resources for further guidance on this issue.
 

Related to Linearization with a Constant Block in Matlab

1. What is linearization with a constant block in Matlab?

Linearization with a constant block in Matlab is a process of simplifying a complex mathematical equation by breaking it down into smaller, easily solvable parts. The constant block refers to a fixed value or parameter in the equation that does not change. By using this method, it becomes easier to analyze and manipulate the equation to solve for specific variables or parameters.

2. How do I perform linearization with a constant block in Matlab?

To perform linearization with a constant block in Matlab, you can use the built-in function "linmod" which takes in the nonlinear equation and the constant block as inputs. This function will then return a linearized version of the equation that can be solved using standard linear algebra techniques.

3. What are the benefits of using linearization with a constant block in Matlab?

Linearization with a constant block in Matlab can make complex equations more manageable and easier to work with. It also allows for more accurate analysis and predictions of the system or process being modeled. Additionally, linearization can help in designing control systems and optimizing system performance.

4. Are there any limitations to using linearization with a constant block in Matlab?

While linearization with a constant block can be a useful tool, it does have some limitations. It may not always accurately represent the behavior of a nonlinear system, especially if the constant block is significantly different from the actual variable. In some cases, linearization may also result in a loss of information from the original equation.

5. Can linearization with a constant block be used for any type of equation?

Linearization with a constant block is most effective for equations that are close to being linear, meaning they have a small range of variation for the variables. It is not suitable for highly nonlinear equations or those with large variations in the variables. It is important to carefully consider the appropriateness of linearization for the specific equation and application before using this method.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
11
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
3K
  • Introductory Physics Homework Help
Replies
29
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top