Answered
State Space with Disturbance
Combine d and u into a single input vector: Xdot = A*X + [B F] * [u;d] y = C*X + [D 0]*[u;d] % assuming the disurbance doesn'...

5 years ago | 4

| accepted

Question


Why Would fplot(f) and fplot(vpa(f)) Show Different Results?
I'm seeing different results between fplot for a symfun object, the fplot of the vpa form of that object, and the regular old pl...

5 years ago | 1 answer | 0

1

answer

Answered
How do you do Unity Feedback on Matlab? (Transfer Functions)
Check the doc page for feedback() doc feedback In this case, the feedback line isn't "empty," it has a gain of 1 (or if you pr...

5 years ago | 0

Answered
Illustration of Frequency Response (magnitude and phase response)
if you wnat to plot them yourself, then use plot(), or semilogx() or whatever plotting function meets your needs. Or you can de...

5 years ago | 0

Question


Peculiar Result with Solve (Symbolic Math Toolbox) with Three Equations and Three Unknowns. Can Anyone Explain?
Suppose I have three equations and three unknowns as so: >> syms X1 X2 X3 real >> e1 = X1/(X1 + X2 + X3) == 0.1; >> e2 = X2/(...

5 years ago | 1 answer | 0

1

answer

Answered
Generation of Conditional Random Variables
Based on this comment, the problem is as follows: Let Xi be a set of independent, continuous random variables, i = 1-n. Let wi...

5 years ago | 1

Answered
How do I stop a signal after a fixed time and let the simulation continue?
Use a Switch block: https://www.mathworks.com/help/simulink/slref/switch.html

5 years ago | 1

| accepted

Answered
Model Linearisation - Open Loop Input and Input Pertubation has the same input values ?
The linear analysis points (Input Perturbation, etc.) only apply for linearizing the model. They don't have any impact when runn...

5 years ago | 0

Answered
How to obtain Real and Imaginary parts of symbolic polynomial
From the context of the code, it appear that w is a real number. Assuming it being so will help: >> syms s syms w real poly...

5 years ago | 0

| accepted

Answered
fft of Rectangle*sin function in MATLAB
It appears that you want to find the Continuous Time Fourier Transform of a windowed cos wave, where the window covers an intege...

5 years ago | 0

| accepted

Answered
Error when using find function
Maybe you want to start with ismember? doc ismember

5 years ago | 0

Answered
how to use ss and lsim for 1 dof differential equation
That lsim command calculates y using default initial conditions x(0) = xdot(0) = 0, but the analytical solution clearly doesn'...

5 years ago | 0

| accepted

Question


Given One Partition of a Matrix, What is the Best Way to Find a Second Partition that Ensures the Matrix is Nonsingular?
Suppose I have a matrix C, dimension m x n, m < n, and that rank(C) = m. I wish to find a marix V, dimension n-m x n, such that...

5 years ago | 3 answers | 0

3

answers

Answered
Lsim gives NaN for square input
Look at the eigenvalues of the plant matrix: >> eig(sys) ans = -6.846331220081878e+07 -5.237359879589575e+07 ...

5 years ago | 0

| accepted

Answered
Invalid use of operator in for loop
You're geting the error because that's the wrong syntax for a for loop: doc for Having said that, it kind of looks like you re...

5 years ago | 1

Answered
How do I find the LTI system using deconv, when it is connected to more systems and with the final impulse response?
I think heaviside is function from the Symbolic Math Toolbox, but I don't see any symbolic variables defined. In any case, perha...

5 years ago | 0

Answered
Simulink Difference Equation Implementation
Maybe this example will help, which essentially illustrates the comment made by Alvery. Consider a plant P(s) = 1/(s + 5) that ...

5 years ago | 0

| accepted

Answered
Simulink with control system designer: Step response is completely flat.
The block diagram has an Open-loop Input at the input to the plant (on the line marked "u + d") so the response from any input t...

5 years ago | 1

| accepted

Answered
How to chose one form of transfer function from other forms
You don't need to get the num and den explicitly using tfdata (unless you need them for some reason). To convert from ss to tf: ...

5 years ago | 1

Answered
Error using acker System must be single input.How can I solve this problem ?
Try using the place command: doc place

5 years ago | 0

Question


Why is extractFileText Much Slower than fileread for Text Files?
I'm fine with using fileread, but am curious why extractFileText is so much slower: >> tic,for i=1:500,s1=extractFileText('sonn...

5 years ago | 1 answer | 0

1

answer

Answered
Can I do this using matlab or simulink?
It looks like the Simulink model is that of a linear time invariant (LTI) system. If that is the case one can use linmod to get ...

5 years ago | 0

Answered
Rearrange state space system
Let's assume that the state space model from Simulink is defined as: xdot = A*x + B*u [y1;y2] = [C1; C2] * x + [0;D2] u where...

5 years ago | 1

| accepted

Answered
Why can't I get the same plot as the official tutorial video? (non-minimal phase system)
I get the same Bode plots. What's different about yours? Also, you can do this with one Bode command bode(G,G_RHP_zero,G_delay...

5 years ago | 1

| accepted

Answered
Using Lsim to solve a dynamic control model.
It sounds like wf1 and wf2 are supposed to be step inputs at t = 1 and t = 5. In Simulink these were implemented with Step block...

5 years ago | 0

Answered
Accurate rise time with stepinfo()
The first input to stepinfo is incorrect. It should just be g >> S = stepinfo(g,'RiseTimeLimits',[0 0.632]) S = struc...

5 years ago | 0

Answered
How to input a vector in Simulink with initial values to ultimately plot it over time?
Define x0 and A in the matlab workspace. Here is the block diagram. Make sure to select matrix multiply for the gain blocks. De...

5 years ago | 0

| accepted

Answered
Is there a way to reset after a given time the initial condition of an integrator block in simulink?
If you haven't already, check out section Resetting the State on the Integrator block doc page.

5 years ago | 0

Answered
Plotting control closed loop input
The direct answer to your question is this line: >> u = -K.*ycl2 + F.*r; Matrix dimensions must agree. >> size( -K.*ycl2) ...

5 years ago | 0

Question


How Do I Delete a Linear Analysis Point from a Block Diagram?
I have a Simulink block diagram and on one of the signal lines I set a linear analysis point: right click -> Linear Analysis Poi...

5 years ago | 1 answer | 0

1

answer

Load more