Questions tagged [matlab]

MATLAB is a commercial numerical computer algebra system

361 questions
Filter by
Sorted by
Tagged with
8 views

low pass LC filter for pv

I'm new here, I have some fairly basic doubt. I am trying to make a LC filter in MatLab for a pv system. input voltage 400v dc output voltage 240v rms frequency 50hz switching frequency 20khz can ...
43 views

Cutoff frequency of transfer function at -6 dB

I'm trying to design a second order low-pass filter using the following transfer function: $\ H(s)=\frac{f_c^2}{s^2 + 2 f_c s +f_c^2}$ with cutoff frequency fc = 3400 Hz Whenever I plot this, ...
14 views

Possible inconsistencies in solution to second order transfer function step response

I'm trying to use matlab to solve the second order DE for car suspension for a particular oscillation period and overshoot percentage (0.5s and 5%). I thought I had solved it but I've found some ...
11 views

Using symbolic expression to store and fplot summation (symsum) - truncated Fourier series

I need help to: Create a symbolic expression of a summation; Using fplot, plot this summation for the interval between -1<=t<1 In other words, create a symbolic expression for xN(t) for N= 1,3,...
45 views

Trouble connecting to temperature controller using MODBUS,RS485 and MATLAB

I am trying to communicate with a temperaturature controller ATR-401 using MATLAB but i am having trouble just connecting to it and reading temperature data.I have set baud rate, data bits, parity and ...
25 views

Read Data from Temperature Controller using MATLAB, Need Help

I am trying to read data from a temperature controller called ATR-401 using MATLAB's tool box called Instrument Control Toolbox but every time i try to read data from it i get an error "A timeout ...
44 views

Matlab code to derive the overall difference equation relating two systems

Using Matlab, I am trying to: Get the overall difference equation relating to z[n] to x[n] and check if z[n] = x[n] is a valid solution to the overall difference equation I have two signals given ...
67 views

Reading data from Pressure Sensor

I am having trouble reading data from a pressure sensor using MATLAB. The pressure sensor is connected to an NI 9219 Analog Input Device. Firstly, i tested the device to make sure it is working using ...
41 views

Matlab code to determine and plot impulse response

I have a signal y[n], represented by the vector y in this form y[n] =x[n] + ax[n−N] About this signal: x[n] is the uncorrupted speech signal which has been delayed by N samples and added back in ...
40 views

How to use MATLAB to observe the effect of multiple damping factors?

I want to use MATLAB to observe the effect of changing zeta (damping factor) on system response? Here is a m-file code that plots three responses: underdamped, overdamped and critically damped. <...
26 views

Calculating energy signal with symbolic math toolbox

I am trying to do calculate, via integration int, the energy of a signal using Matlab. My signal is defined this way: f(t) = t * (u(t) - u(t-2)). For this, I have the following code: ...
27 views

Setting up parameters for generating QAM signals

I am trying to simulate multiple baseband QAM signals for random data at varying power levels, data-rate, carrier frequency, and modulation order using MATLAB. Here is how I set up the parameters: <...
71 views

How to determine value of t when plotting a signal

I'm trying to implement this model inatlab: I know that Ri = 2 and Si = -0.05+3j, ignore n(t). I want to plot the signal in time response, this is what I got so far: ...
29 views

How to model RF-PA in MATLAB when the design values are given?

I have been given a designed Class-E RF-PA - the technology used for the MOSFET, the inductor and capacitor values attached to the MOSFET (as given in the figure below). I am suppossed to find the AM/...
92 views

Vanishing of Gibbs Phenomenon in MatLab

I was trying to represent a square wave with its Fourier series in Matlab. But as I increased the number of terms in Fourier series expression, the Gibbs phenomenon vanished and the edges of the ...
168 views

Embedded C - USB stack, arm-none-eabi-gcc settings and Matlab interface

I am using LPCOpen (latest realese available for LPC4370) and the usb stack provided within it. I need to build a simple FSM to control the mcu with Matlab and send data from Matlab to the mcu and ...
43 views

Phase noise of a digital PLL

I assume the reader is aware of how a DPLL works. The DPLL oscillates with a frequency of $F_{out}$. The DCO free running frequency is $F_{free}$. In the model of our DPLL we've only considered ...
25 views

What is the correct graph for the IEEE 14 bus system bus voltage?

I'm working on optimizing the powerloss across an IEEE 14 bus system. I got this figure for the voltage across the buses before and after DG placement. Is this how a typical 14 bus system voltage ...
26 views

What is the time axis array after we convolve two functions in Matlab after sampling it with frequency $f_s$?

Suppose we have a continuous time function $f(t)$ , we sample it at frequency $f_s, (t = -5:1/f_s:5)$, and store it in an array $a$ in Matlab. Now we convolve it with itself using \\$b = conv(a,a)...
109 views

Relationship Between Root Locus Pole and Percent Overshoot and Gain in MATLAB

I have a peculiar confusion regarding the relationship between a closed-loop pole on a root locus plot and its gain and percent overshoot. I have found a point on the root locus plot that MATLAB ...
33 views

How do we interpret frequency from fft command in matlab?

How do we interpret frequency from fft command in matlab? When I apply fft to a sampled function(@ Fs) and I get peaks at some values in the fft array. How do I know what frequency in Hertz does it ...
47 views

MATLAB:Reducing Transfer Functions using: Append&Connect technique VS Feedback,cloop,series&parallel command technique

The problem here was when I tried to counter check my answer using algebra and the two techniques above I got three different outputs all together.. The code: ...
23 views

Is it possible to predict the operating state of a power system (using MATLAB) if I have calculated the voltages at all nodes by state estimation?

If I have calculated all the node voltages by state estimation, is it possible to predict which operating state my system is at? By operating state, I mean any of the following: ...
39 views

Sawtooth to Straight line in Simulink

There is a component in LabVIEW called as "Inverse Modulus". It is used to eliminate the discontinuous jump that would occur when the DAC encoder of the hardware reaches the limits of this range. ...
136 views

Why am I getting non-sinusoidal output for sinusoidal input in a mass-spring system?

A mass-spring system is represented by the following transfer function $$H(s) = \frac{s^{2} + 0.1s + 10}{s^{4} + 0.2s^{3} + 20s^{2}}$$ For a sinusoidal input I am getting a non-sinusoidal output, ...
32 views

First-order hold interpolation in matlab

I have a sinusoidal signal x(t) sampled with period 1/fs. The result is the discrete signal x[n], where x[n]=x(t)|t=nT. Then I perform an upsampling of factor, let's say, 8 to increase the sampling ...
107 views

Pulse generator in Simulink Matlab

I want to generate a pulse in Matlab Simulink fixed point solver. The step size in the Simulink fixed solver is 1e-06, but I need a pulse width of 2e-08. The figure shows the clear requirement of ...
53 views

CORTEX-M LPCOPEN USB-VCOM basics - proper way to build a simple FSM

I'm working on a project involving the LPC4370 mcu (LPC link 2 eval board) and Matlab. I need my embedded code to be user-reconfigurable from matlab: the user sends a command, the mcu replies. I'm ...
53 views

Obtaining Plant Input data from System Identification (PID)

I'm trying to obtain a mathematical model from a physical plant using MATLAB. Using the system identification tool you need the plant input and output data. I'm struggling to match the theory to my ...
39 views

Node analysis with voltage source, How to solve with matlab?

So i have this matlab homework where i need to find voltage on Y2 and Y3 using node analysis. Arrows indicate direction of current flow in branches. simulate this circuit – Schematic created ...
54 views

Simulation/modelling of a RFID system (reader, antenna, tag)

The input parameters for the simulations are: Area of environment where the RFID system will be placed i.e. in a rectangular space. Number of antennas. Number of passive tags within the environment ...
87 views

How to implement low pass filter in the differential part of PID in time domain

I programmed PID in MATLAB: ...
32 views

Values got from programmed PID are different from ones simulated in Simulink

Please also read Update I created a PID simulation in Simulink: where the Step block is set with parameters: ...
17 views

Help with modeling a 6-phase motor in Simulink

I'm not sure if I'm posting in the right subsection, however I've recently started working on a project. I have little background on the subject. I've a degree in electronics which mainly focused on ...
65 views

How to implement a dirac delta as input signal for this system

y[n] = b0x[n] +b1x[n-1] I have this MA filter in matlab as following ...
27 views

Adjust LQR weights to improve battery runtime in two-wheeled-inverted pendulum

I'm currently doing a controls project involving a self-balancing robot(or two wheeled inverted pendulum). I have been able to stabilize the system with the use of PID and optimal state feedback. ...
33 views

Using Matlab poctave function under 3 Hz

I would like to get the Fourier transform of my data from 0,5 to 80 Hz at every 1/3 octave. I tried using Matlab poctave function but that one is only working over 3 Hz. My question is there a way ...
216 views

Using LTSPice to make Function Blocks for SIMULINK

I have a PLL that I want to model in Simulink using the control theory toolkit. I have the schematics for the PLL in LTSpice. Does anyone know of a way that I can integrate the spice model with my ...
63 views

using IC in Matlab [closed]

I dont understand how to simulate circuits which contains IC's(like lt680xx or IC 555 timer).is it even possible to use them in matlab simulink?If yes, how can we do it?
83 views

Fourier transform does not produce the correct result

I am trying to calculate the absolute value of a certain sinusoid to see how MATLAB calculates the Fourier Transform by using the freqz() command. Here is my Matlab code ...
31 views

How to calculate or show in matlab/pspice the DC component from a circuit simulation?

Based on Pspice I'm simulating this RL full wave rectifier That gives the next voltage and current output at the showed probe point The idea is to extract the DC component of the current or voltage, ...
221 views

RLC Low-Pass Filter with MATLAB

I'm trying to refresh my knowledge on RLC filters, and I'm using MATLAB to model it. Given an RLC circuit with the elements in series, taking the output at the capacitor should result in a 2nd-order ...
76 views

Matlab: Solving homogenous set of linear equations based on Kirchhoff's circuit laws

I have got the following equivalent circuit of a common source amplifier from which I want to determine the expression for the voltage gain A = VD/VG. Because I have pretty much more difficult ...
50 views

DC motor model issue

I use the following DC drive model: with the following parameters of the motor: Matlab variables for these parameters: ...
173 views

Plot antenna radiation pattern in Matlab

I have the antenna radiation pattern exported from CST. The file is txt file format and contains the angles theta and phi and the directivity. First theta varies between 0 and 180° and phi is 0° and ...
201 views

Design of a lead compensator with root locus in matlab

For the transfer function G(s), I tried to design a lead compensator for the function to have a response to the step with the following specifications: Overshoot= 10%; Ts (2%) = 5s. When I simulate ...
57 views

“Hidden” variable in Simulink models

Some example models that are included in the Simulink library, there are some variables that their value is not visible. For instance, in the model power_PVarray_grid_det the sample time of the ...
26 views

Bandstop FIR Filter in Matlab

I have a problem here and I'd like some opinions. So, I need to design a Bandstop FIR filter and find its impulse response & frequency response in Matlab. I was thinking that, for the impulse ...