Questions tagged [matlab]

MATLAB is a commercial numerical computer algebra system

Filter by
Sorted by
Tagged with
-1 votes
0 answers
21 views

How to find frequency of a signal in matlab simulink

I have to find the frequency of the output signal from the inverter at AC+ port line as shown in the figure, But there is no direct simulink tool to measure the frequency directly.
user avatar
-1 votes
1 answer
31 views

BPSK demodulation on scilab

I have a csv file which contains the time and magnitude of the BPSK modulated waveform. I now want to demodulate this. Its bitrate is fc/128 (~106 kbit/s) and the carrier frequency is fc/16 (~847 kHz)....
user avatar
  • 11
-1 votes
0 answers
19 views

Confused about the method of plotting complex signal in matlab

I am trying to solve the Question No. 2-c-iii. of the following problem: I'm a beginner to Matlab and signal processing & I'm having problem plotting this kind of complex signal. I've only dealt ...
user avatar
-1 votes
1 answer
94 views

How can I determine the circuit from a transfer function [closed]

I have identified a couple of transfer functions, which fit well to measured data, using MATLAB system identification toolbox. How can I determine a circuit diagram from these transfer functions? $$\...
user avatar
  • 111
0 votes
1 answer
44 views

Generating a sinewave on Matlab with specific harmonics [closed]

I need to generate a sinewave on Matlab so I can use the generated values, I need 1000 samples per cycle for grid simulation using micro-controller. I was able to generate a pure sinewave and it is ...
user avatar
  • 23
0 votes
1 answer
42 views

How would a modulated and demodulated signal differ in FM and PM? Simulink Simulation

I am trying to observe the differences of phase and frequency modulation. On the figure below, the left scope shows a frequency modulation and demodulation whereas the right scope shows a phase ...
user avatar
  • 173
-2 votes
1 answer
44 views

Matlab: using a small sample time for sine wave, makes the wave's frequency "accelerate"

I noticed that if I use a small sample time of DSP sine wave in matlab, the signal's frequency "accelerates": This is the signal with a proper sample time: But if I reduce the sample time ...
user avatar
0 votes
1 answer
107 views

Matlab: spectrum analyzer does not display the output from "Sample and hold block"

I try to use the Sample and Hold function, to show its output on the spectrum analyzer. But it gives me this error "Spectrum cannot be displayed for continuous or infinite sample times", ...
user avatar
0 votes
0 answers
36 views

How to calculate efficiency of an MPPT Algorithm

My PV system with an MPPT algorithm is extracting about 97% power of the Maximum power that can be extracted from the panel. However, the matching of the load through converter did not happen as ...
user avatar
  • 1
1 vote
0 answers
77 views

Modified nodal analysis of a half wave rectifier?

I am trying to solve a halfwave rectifier circuit using the modified nodal analysis algorithm in MATLAB. The MATLAB code is given below. I am not able to see where the flaw is in the approach. I will ...
user avatar
  • 61
0 votes
0 answers
49 views

When I connect a battery, the system fails

I have a standalone PV system with boost converter using perturb and observe (P&O) as the MPP algorithm. The values of input, output capacitors, inductor are calculated correctly based upon a ...
user avatar
0 votes
0 answers
40 views

How to asses the performance of an MPPT algorithm?

I have a standalone pv system with PV Panel rating 6820W, a buck converter, 12V battery , DC resistance (load) of 8 ohm with Perturb and observe (P&O) as the control algorithm. Upon simulating, ...
user avatar
0 votes
2 answers
50 views

Can anyone explain the role of some of these blocks in this PV inverter system?

I get the role of following blocks: 1)MPPT controller (is a matlab function code of Perturb and observe) 2)boost converter 3)H-bridge inverter and its PI controller. I don't get the role and working ...
user avatar
0 votes
0 answers
39 views

How to calculate the maximum load that a standalone PV system can handle?

I have a 6820W pv panel, a boost converter, a H-bridge inverter, a 48V 540Ah LI-ion battery, a 100ohm dc and a 100ohm ac load in my system. My question is what is the maximum load that this system can ...
user avatar
0 votes
0 answers
17 views

Problem when trying to re-create dynamic system Simulink model from .m model

I'm trying to convert the pendulum on cart's dynamic model that's described in this Youtube tutorial: Inverted Pendulum on a Cart [Control Bootcamp] into Simulink to develop some control algorithms. ...
user avatar
0 votes
0 answers
19 views

Logistic Growth in MATLAB -- Need help with the plot

I'm working on a school project about coding the logistic growth using matlab gui, till now everything is great, the calculation is perfect, but I'm stuck with the graph, it always show only one point ...
user avatar
  • 11
0 votes
1 answer
70 views

Difficulties in tuning magnetic levitation system on Arduino and MATLAB?

So I am dealing with a project that revolves around magnetically levitating an object below an electromagnet. I created a transfer function of it after making a mathematical model of it, and got this ...
user avatar
  • 211
0 votes
0 answers
27 views

Photovoltaic array reconfiguration for a 3x3 array under partial shading conditions

I'm trying simulate photovoltaic array reconfiguration using particle swarm kptimization in MATLAB Simulink. I need to build a controller for the switching matrix that switches the arrays based on ...
user avatar
  • 1
0 votes
0 answers
38 views

Strange result in modelling magnetic levitation system?? Negative Transfer function?

I'm working on this magnetic levitation system project where I basically levitate an object under an electromagnet using an Arduino. Currently, I'm stuck at the graphical simulation of my transfer ...
user avatar
  • 211
0 votes
0 answers
31 views

Matlab model: Continuous & Discrete-Time behaviour of a Switched-Cap. Integrator circuit

I would have the following question at the end of this text. To bring everyone to a common understanding, I need to first develop it a bit and make some statements. I tried to be as precise and short ...
user avatar
0 votes
1 answer
68 views

How to use inverse function of Cp vs Lambda of wind turbine in MATLAB script

I want to use inverse function. I know the value of Cp and I need to calculate Lamda and Beta through this formula. How can I do? I think it has to do with a lookup table of Cp vs Lambda for DFIG Wind ...
user avatar
0 votes
0 answers
42 views

Simulating a wind turbine in Simulink

I am trying to simulate a wind turbine in Simulink. The given input data is average wind speed for each hour for one year. I have also connected it to the grid and added a capacitor bank (this has ...
user avatar
0 votes
2 answers
184 views

Sine wave amplitude to binary MATLAB lookup table

I'm trying to generate a 256 point 8-bit sine lookup table for digital synthesis. I wrote the below MATLAB code for generating the binary numbers from amplitude and copying into a data file. It works ...
user avatar
  • 43
5 votes
1 answer
225 views

Need help with simulation of three-phase rectifier with hysteresis controller

I am attempting to design a closed loop three-phase rectifier with hysteresis control using MATLAB simulink. The outer loop compares output DC voltage with reference voltage, given to a PI controller ...
user avatar
1 vote
0 answers
25 views

Get alpha-beta plot of Clarke Transform in Python

For a project I'm working on, I want to use the Clarke Transform to detect faults in a power system. To do this, I already wrote a script in Python which returns the sine wave behavior of the Alpha, ...
user avatar
1 vote
0 answers
39 views

Relative error of power estimation

I'm reading my teacher code for FFT windowing in Matlab and there is one thing I don't understand. When you run the code at the end it says: ...
user avatar
  • 11
0 votes
0 answers
53 views

State space model of a PWM driven circuit

I am trying to write down the state space model of the circuit given below: As it can be seen above, a P channel mosfet transistor is driven by a PWM signal. I am trying to model the circuit ...
user avatar
1 vote
2 answers
125 views

Removing DC offset in MATLAB

My teacher has a demodulated signal and he removed the DC offset with this one line of code in MATLAB: y_dc = y - mean(y) Can someone please explain how this line ...
user avatar
1 vote
1 answer
44 views

computation bit error as sum(abs)

I am working on a realisation the convolutional encoder/decoder with constraint length K=7. Encoder and decoder were implemented and currently I am testing these functions My test file looks like: <...
user avatar
0 votes
1 answer
108 views

Why am I getting linear phase?

I'm trying to plot the phase of Fourier transform of the function below: \begin{gather*} x[n] = 2e^{-0.9|n|} \: \: n \in [-5,5]\\ x[n] = 0 \:\: n \notin [-5,5] \end{gather*} which is equal to the ...
user avatar
1 vote
1 answer
93 views

Exporting LTSpice waveform data from Monte Carlo simulation and manipulate it in MATLAB

So I am doing a Monte Carlo Simulation on LTSpice. Then I want to export my data and manipulate it in MATLAB. Here is a working example file, just with 2 decades each one with 11 points and 6 ...
user avatar
2 votes
2 answers
126 views

Filter noise using MATLAB to include in LTspice

I have measured a voltage, and I need to include the .txt file in my LTSpice simulation. Before doing that, I first want to filter the noise I ended up measuring (see figure below). How can I do that ...
user avatar
0 votes
1 answer
204 views

Implementing quadratic linear regulator (lqr) in simulink

I am working with a non-linear model of a hot-air balloon. I have linearized the system, found the operating point, the state space matrices and I know these are correct:- ...
user avatar
  • 2,996
1 vote
0 answers
84 views

Numpy giving the wrong Fourier transform of sine functions

I'm using numpy's FFT to calculate the Fourier transform of \$\cos(\omega_0t)\$ and plot it. By using the definition we can derive its Fourier transform as below: \begin{equation} X_3(j\omega) = \pi (...
user avatar
0 votes
1 answer
118 views

Phase of Fourier transform when it arrives at \$ \pi \$

I'm trying to calculate the phase of "rect" which is like below \begin{equation} f(x)=\begin{cases} 1 & \text{if }256<x<768,\\ 0 & \text{otherwise}. \end{cases} \...
user avatar
2 votes
1 answer
74 views

Difference in Bode plot with table and Bode plot in Matlab

I am trying to generate a Bode plot for a transfer function of a high pass circuit. It's part of a solution to another question but this is the part that is confusing me. I have a transfer function: ...
user avatar
1 vote
2 answers
64 views

NI myDAQ behaving weird, not measuring inputs after some random time period

I am using the National Instruments myDAQ with MATLAB (using the Data Acquisition Toolbox) to generate a sine wave at defined frequencies at one of the output channels. The output channel is (...
user avatar
  • 113
0 votes
0 answers
39 views

Im struggling trying to use HFSS (eigen mode simulation)

Okay I am supposed to set up a a rectangular vacuum filled PEC resonator in an eigenmode simulation. How am I supposed to do this? I got a rectangular prism set up with all sides as PECs and on the ...
user avatar
0 votes
1 answer
79 views

How do you sketch the amplitude response in MATLAB?

How do you plot the amplitude response where: $$Y=\dfrac{1}{\sqrt{R^2+\omega^2 L^2}}$$ That's it. I'm really struggling with symbolic math or converting it to a tf for bode plot and whenever I try to ...
user avatar
1 vote
1 answer
103 views

Why am I getting NAN and inf in output? [closed]

https://ctms.engin.umich.edu/CTMS/index.php?example=BallBeam&section=SystemModeling Above link gives information about a ball & beam system. I am trying to find the output response of a ball ...
user avatar
  • 11
0 votes
1 answer
174 views

How can I plot the frequency response of the equation below using MATLAB?

$$\boxed{\dfrac{V_{\text{out}}(j\omega)}{V_{\text{in}}(j\omega)}=\dfrac{2\times10^9}{(1+10j\omega)(100\times10^3j\omega+20\times10^3j\omega+2\times10^9-20\times10^3j\omega}}$$ and $$\dfrac{V_{\text{...
user avatar
1 vote
1 answer
59 views

Output of block diagram in Z-Domain ob block diagram

I want to calculate Y(Z)[Z-Domain] for the given system with matlab. See picture of the block diagram I have tried to solve it with matlab. I have written the following matlab code. ...
user avatar
0 votes
1 answer
100 views

Reason for frequency steps shown in Simulink FFT analysis tool

While using the FFT in Simulink tool, I have observed that if more number of cycles are selected then frequency steps in which harmonics percentage is shown is also divided accordingly. For example: ...
user avatar
1 vote
2 answers
2k views

Confusion calculating steady state error in MATLAB?

I am trying to use MATLAB to calculate steady state error I have found a weblink that gives code for finding steady state error but when i use that code i get value of steady error to be greater than ...
user avatar
  • 265
-1 votes
1 answer
103 views

How to plot graph of perpendicularly polarized uniform plane wave is incident obliquely on a dielectric to conductor boundary using Matlab

I am writing the code for the equation which is attached below ( image of equation). I have written the code but getting errors. I want to plot the graph of E and H as underlined in the image. In the ...
user avatar
0 votes
0 answers
61 views

C Caller Block in Simulink does not show port specification?

so I am following the steps to create a C Call block function in Simulink as in the video linked here: C Caller Block - Integrate your C code into Simulink Models Here is the source code and header ...
user avatar
  • 301
0 votes
0 answers
58 views

FMCW radar sensor for vital sign signal processing

In order to get started with radar signal processing in MATLAB, I want to capture the heart frequency and respiration of a person with a FMCW radar. I only want to do post signal processing in MATLAB, ...
user avatar
  • 1
0 votes
2 answers
99 views

How to convert non-standard sample range to standard

I'm working on a project to record sound from a Raspberry Pi. I have ADC values raning from 0 to 4095. I can convert it to an audio file and hear my voice. This is my algorithm for getting sample ...
user avatar
  • 11
0 votes
0 answers
33 views

Three Phase Inverter Simulator Code

I am trying to build a controller for inverter. For this, I need build an inverter simulator, which simulates the model of the said inverter to produce a three phase output. I am trying to approach ...
user avatar
0 votes
0 answers
40 views

Simulink: PV System (Need help with the voltage regulator part)

I have been trying to model a PV system for a household. The scheme is as shown in the diagram. Its just a PV that connects to a boost converter then eventually an inverter. I have properly managed to ...
user avatar

1
2 3 4 5
11