# Questions tagged [matlab]

MATLAB is a commercial numerical computer algebra system

420 questions
Filter by
Sorted by
Tagged with
843 views

### How can i create a dead time between two signals in Matlab/Simulink?

I have a curcuit which outputs two different pulse signals from two different "PWM generator(DC-DC)" block. I will apply these signals to two different mosfets. Thus I need to create a dead time to ...
340 views

### Root locus for an open loop transfer function?

The function, rlocus(), in MATLAB is used for closed loop system roots for variation in gain K. However, I am curious if there is a similar function for variation ...
75 views

### how to edit the signal name of scope?

I used the Using the PLECS Scope to edit the scope but when it comes to the name of the signal I could not change even though I double-click on it and tries many times, is there any way to change the ...
190 views

### Create repeated pole/zero in transfer function---Octave

Say I have such a transfer function with a repeated zero $$\frac{s^2}{s+2}$$ How do I enter this in Octave as a transfer function? Perhaps this question applies to Matlab as well. If the zero was ...
119 views

### Phase Locked Loop Gain Design- FM Demodulation

Say I am trying to demodulate a message up to 25kHz in frequency, with a peak frequency deviation of 75kHz and a carrier of 1MHz, implying a 200kHz bandwidth using carsons rule. Would I design the ...
430 views

### Triggering the thyristor for the single phase AC voltage controller in MATLAB

I have been trying to study the output characteristics of a thyristor based single phase AC voltage controller through the model in the picture attached. Could anyone tell me what I could do to ...
556 views

### How to increase the size of value of X/Y axes in Simulink scope?

I want to increase the size of the value shown in the X and Y axes so it can be seen in the report. If you look at this figure, we barely see the value:
445 views

### Matlab Phase Locked Loop Design : FM Demodulation

EDIT: It seems I've asked too much at once here. I'll do some more studying and come back if I have more specific questions. I'm trying to design an analog phase locked loop in Matlab. I've read ...
90 views

### How do I integrate a function and plot the result on Matlab?

I need to plot a function that has an integrate inside, but I don't know how to do this on Matlab. Function: $SOC(t)= SOC(0) - \dfrac{1}{Q}\int_{0}^{t}i_2(t)dt$ time is in hours, current is in ...
91 views

### How determinate parameters for thermal-model battery (Advanced question about battery modelling)

I'm trying to simulate an electrical model based on Ceraolo battery model for lead-acid battery. The challenge in this model is to determine the parameters that describe it. I can understand and ...
1k views

### how to obtain the parameters of the step response within matlab in open loop?

I have step response in open loop of my model that i stored in workspace and I want to use Matlab to obtain the: T time constant, L dead time and A (see figure below).is there a command for that like ...
527 views

### step response data extraction from response data of a model(simulink)?

I want to design a PID controller with the step response method, so I needed to save the step response of my model in simulink in workspace (Vout) with saved format :structure wih time, I exctracted ...
199 views

### Solution for a set of non-linear equations

I am trying to solve the following equations for $\delta$ and $K$. I have tried Matlab function fsolve, but unsuccessfully. I also tried Wolfram Alpha and, ...
2k views

I would like to know how to shift a signal in Simulink. The case is I am using PWM generator(DC-DC) and the input D is from a lookup table,a sine wave. From the PWM generator block i am taking the ...
69 views

### Constructing a reactive lighting system?

I've recently written a Matlab script to develop/simulate PWM output for RGB lights based on sampled audio input. I made this script with plans to actually construct a device that can run the ...
588 views

### What is the correct way to measure DC power at the output of a boost converter in a Simulink simulation?

I modeled a DCDC boost converter, and I would like to measure the power at the output of the converter, I do not understand much about simulation times, sampling, and this sort of thing, so I do not ...
85 views

### Pole-placement problem

I was following this example of implementing a pole-placement with an Integral controller. Matrices A_star=[-5 -3 0;1 0 0;0 -1 0] B_star=[1;0;0] desired poles -100,-8+i*11,-8-i*11 I know the ...
285 views

### Circuit Breaker Simulation in Matlab with Mayr and Cassie Equations

I'm trying to understand how to model arc circuit breaker. There is a simulation example as called Mayr and Cassie Circuit in Matlab&Simulink. I have examined Mayr and Cassie Differential ...
778 views

### Why simulink step response differs from matlab's step function?

step response is different in simulink showing oscillatory behavior unlike in matlab step function Transfer function Step response Block diagram in simulink Simulink scope
93 views

### Rayleigh distribution

Why do we have to multiple the complex uniformly distributed random variables by $\frac{1}{\sqrt{2}}$, for a Rayleigh distribution. In terms of when we want to transmit data across a Rayleigh ...
32 views

### Calculating cell resistance in dependence from cell temperature from CAN bus logs

I'm part of a formula student team. When we go testing we are logging the CAN bus data the car produces to further understand what the car is doing. We log all the battery cell temperatures/voltages ...
62 views

### Fourier Series, Transfer Function, Unexpected output

I am working on a project where I am trying to graph the output of input various functions represented by fourier series, applied to a transfer function of a bandreject filter. I am getting my ...
147 views

### Bluetooth System in MATLAB

There is a Bluetooth model in MATLAB that can be accessed using this command : commbluetoothfduplex Here its Link : https://www.mathworks.com/help/comm/...
61 views

### Struggling to figure out why this capacitor voltage is huge

As you can see in this image from simulations on Matlab-Simulink: I'm tracking the blue signal (reference current) using this circuit Which is in this 400 kV HVDC link as "Snubber". So basically ...
382 views

### MATLAB Code to calculate intermodulation and Third Order Intercept (of an Amplifier)

My well annotated MATLAB code and plot is attempting to calculate the third order intercept of an amplifier. I have raw data of a non linear transfer curve, Voltage in (array) and the amplified ...
53 views

### PD compensator matlab

I have a little problem which I cannot understand, control theory is not my specialty but I have been reading on it lately. I have a buck-boost converter which I modeled on matlab and I am trying to ...
550 views

### Sawtooth Wave Fourier Series - General derivation and Matlab issue

I am working on one of my first Matlab projects. I am trying to graph a sawtooth wave with 10-V Pk-Pk, 0-V average value. 50% duty cycle, 2.5 khz. I first attempted to find a general equation for ...
73 views

### MATLAB - Allowing only numeric input using Exception Handling [closed]

I am trying to handle exceptions gracefully such that when a user enters a character, when a number is expected, he is notified with a custom warning/message. I know that the try, catch has the ...
494 views

### Ltspice2matlab error: Bad tag name found!

Hi I want to convert the raw data generated from LTspiceXVII to variables in Matlab. I am using the LTSpice2Matlab function....
786 views

I'm trying to add the following function on my Simulink model. where C, B, and N are already variables in my file. Is the correct way to multiply omega by the gains 3N and N/2 an input that into the ...
98 views

### I2C Communication to the Matlab from Sensor board(8051 µC)

I like to connect my board to Matlab through I2C communication(I2C-USB cable). Is there any library or example scripts in matlab to do it? What are the procedure to do it. for example, I connected ...
146 views

### Why if I change the sample time in Matlab/Simulink modifies results in a huge way?

I'm having trouble with the circuit I'm studying but in order to modify some values, I want to get out this question of my mind. * Example 50e-6 * Example 50e-7 * Example 50e-8 I use a S-Function ...
2k views

### Issue with “Simulink does not support code generation”

I have something similar to this simplified following block diagram on Simulink. It looks rather messy. I want to replace a 3-point summing block with a function block, while keeping the same ...
152 views

### Design and simulation of snubber and hysteresis current control

I want to do an hysteresis current control with this circuit: that have three operation modes: in order to make the output current to follow a triangle wave as reference. I made a simple C code to ...
117 views

### Gyrator in matlab

I am new to matlab , i am trying to simulate a simple circuit to check my calculation I have done on paper. The circuit is the following, it has a gyrator and couple resistors.1 amp is flowing into ...
202 views

### Unable to verify Superposition Principle via Matlab

I am dealing with this problem where I want to verify the Superposition Principle via Matlab. I have a DC source of 100V, an AC source of 50V, 60Hz and three resistances, R1=10 ohms, R2=20 ohms and ...
283 views

### short pulse suppression

I'm looking to build a component (simulink) that cuts off short pulses in a digital signal (that has a varying pulse length). Does anyone have an idea? I thought about using an integrator and ...
39 views

### Matlab AWGN() function

How would do I add additive white guassian noise for an input SNR, without using the awgn() function on mat-lab? Are there any resources available that can help me to solve my problem?
217 views

### Transfer Function Conversion

I am working on a system which comprises an inverter with output LC filter feeding an induction motor Its trivial to calculate the resonant frequency of an LC filter, when the filter is loaded with ...
304 views

### Rolling shutter effect simulation on matlab

Hi I'm doing a simulation of the rolling shutter effect on matlab, in this case the image of the propeller is distorted, and I tried use a DC motor to simulate the plane's engine at home and filmed ...
598 views

### how to import data from MATLAB to ISE XILINX testbench

For a project, i need to take sine samples in MATLAB and somehow i need to call it in Xilinx ISE testbench, so that i can use them for further operations. Please tell me how to do it?
1k views

### ltspice matlab optimization

Has anybody used ltspiceIV in a optimization process using Matlab? I need feedback because I am running my circuit in transient analysis, and when I found the optimal point of my optimization, I ran ...
449 views

### Pole/Zero plot is the same for passive and active (w/ gain) bandpass filter, why?

I have designed an active inverting bandpass filter, and when comparing its pole zero plot to a passive bandpass fitler with the same cutoff frequencys, the pole zero plot is exactly the same, even ...
208 views

### Why is MATLAB a worthwhile investment in electrical design? [closed]

Is MATLAB a worthwhile investment when developing semi-standard circuit designs? such as fitlering, DSP, power supplies, usual things we all encounter. From what I have read and used, it provides ...
3k views

### Using of matrices in simulink block diagrams

All simulations I've done in simulink as yet have not matrix in their block diagram like the following picture : and they have block diagram structure like : for simulating a system that has ...
180 views

### Signal Processing of a raw EMG signal

I am a student. I acquired EMG signal (sampled at 1KHz) by using dry electrodes. At first, it was all noisy. I then applied a Notch Filter (@50Hz) and the signal looks better but still not great. Any ...
89 views

### Manipulating Amplitude and Axis of symmetry of BUBBA oscillator in Simulink

So far i have a bubba ocsillator that can produce smooth sinusoidal waves, but the output waveform is asymmetric about the y-axis and the amplitude is not 1. What exactly do i need to do to :- Make ...
187 views

I am using the MATLAB support package for Arduino. However, I need to configure the ADC reference to external. MATLAB documentation doesn't really explain how to do this? Is there any way I can use ...