結果:
Hello: your help is greatly appreciated, I am trying to solve the following pde numerically with ode45 (if possible). There are three equations in total. I keep getting an error. know parameters: v, D(j), KL(j), cs(j) The IC and BC are provided in the m.file. pde:
% code % Initial, final values of independent variable tspan = [0 7]; P=1, F2=2, F3=3; c_initial_1= zeros(N+1,1); c_initial_2= zeros(N+1,1); c_initial_3= zeros(N+1,1) if t == 0 c_initial_2(1,2) = cs(2) c_initial_3(1,3) = cs(3) c_initial_1(1,1) = cinj end [t, c, kF2, kF3, kP, n2, m2, n3, m3, q, r] = ode45(@ode, tspan, c_initial_1,c_initial_2, c_initial_3); function [dcdt] = ode(t, c, k2, k3, kP, n2, m2, n3, m3, q, r) global N dx dxs dcdt = zeros(N,N) for i = 1:N for j = P:F3 % j== 1:3 1=persulfate, 2 Fraction 2, and 3 Fraction 3 if j == 1 epsilon = 1 else epsilon = 0 end dcdt(i, j) = (-v/(2*dx))*(c(i+1,j)-c(i-1,j))+(D(j)/dxs)*(c(i+1,j)... -2*c(i,j)-c(i-1,j))+(1-epsilon)*kL(j)*(cs(j)-c(i,j))- ... (1-epsilon)*k(j)*(c(i,j)^n(j)*(c(i,1)^m(j))- ... epsilon*kP*(c(i,j+epsilon)+c(i,j+2*epsilon))^q *c(i,1)^r dcdt(N+2,j) = dcdt(N-1,j) dcdt(0,j) = dcdt(2,j) if t == 0 dcdt(1,P) = cinj end end end end end
dc(i,j)/dt=-v*(dc(i,j)/dx)+D(j)*d/dx(dc(i,j)/dx)+(1-epsilon)*kL(j)*(cs(j)-c(i,j))+(1-epsilon)*k(j)*c(i,j)^n(j) * c(i,1)^m(j) + epsilon*kp*[c(i,j+epsilon)+c(i,j+2*epsilon)]^r * c(i,1)^q
Good day everyone,
I'm trying to simulate a single phase transformator by using Simulink. I've got the current values: R1 = 3 Ohm R2 = 0.03 Ohm X1 = 6.5 Ohm X2 = 0.07 Ohm Rc = 100k Ohm Xm = 15k Ohm f = 60 Hz Uprim = 2400V Usec = 240V S = 29kVA cos Phi = 0.8
And I've made the current calculations: L1 = X1/2*pi*f = 17,24 mH L2 = X2/2*pi*f = 185.68 uH Lm = Xm/2*pi*f = 39.79 H S = Urms*Irms => Irms = 120.83 A P = Urms*Irms*cos Phi = 23200 W Q = Urms*Irms*sin Phi = 17400 VAr Q>0 so Q = ohms-inductive => QL = 17400, QC = 0
I've made the current circuit and simulated it, but somehow my secondairy output voltage is only at 225Vrms. Can someone explain to me why that's the case? Did do something wrong in my calculations or in my simulation?
i am confused about how to run as a closed loop. how to do closed-loop control of phase shift using matlab. i am using c2000 embedded by Matlab.
Bonjour A tous,
Je vous écris pour solliciter votre aide si possible. Je travaille en ce moment sur un projet qui consiste a un traitement d'image.
J'utilise une camera thermique associée a une logiciel. Avec ce logiciel, j'enregistre une film de 4 secondes. En gros j'ai une vidéo constituée de 100 images.
Une image comprend 90 pixels donc les valeurs de ces pixels sont reparties en sous forme matricielle (10x9). Ce qui fait que pour les 100 images, j'ai 100 matrices.
L’idée c'est d'avoir une image moyenne donc une moyenne des 100 matrices.
Le problème c'est que je fais le traitement avec ce logiciel. Pour la suite des travaux j'utilise matlab.
J'ai donc besoin de créer un programme sous matlab qui me permet de lire le fichier recueilli par ce logiciel de traitement d'image en me refaisant sortir de façon automatique une moyenne de ces 100 matrices.
Je vous joins en copie un exemple de ce fichier.
J'ai donc besoin de piste pour le programmer.
Je vous remercie d'avance.
Bien cordialement,
Hi, In my circuit, I have an element for which I don't have its equivalent circuit. What I have is a lookup table of its frequency response (magnitude and phase), which is complicated and cannot be represented by a lumped parameters equivalent circuit, and also some of its elements are frequency-dependent. Even if I do obtain somehow its transfer function Laplace representation (using e.g. "System identification" toolbox, and I want to add it to my circuit simulation (Simscape Electrical) as a block.
Does anyone have an idea how to do it? Thank you!
We've been hearing from more and more customers who are interested in using Xilinx's new Zynq UltraScale+ devices in power electronics control applications. The attraction appears to be the dual-core ARM Cortex-R5 processors, which are well suited to hard real time applications. Are you looking at Zynq UltraScale+ MPSoCs as a platform for power electronics control? If so, we'd love to hear from you as we look at support for these devices.
In the meantime, MathWorks offers a reference design example for FOC motor control on Zynq-7000 devices that many customers have used as a basis for developing Simulink models for C and HDL code generation.
Hi guys could u guys please help me explain what is happening on this 3 graphs. I am an electrical student and just to be honest i am not a smart student but I'm willing to learn. Please do help me.Ive got my simulation i managed to generate perfect sin wave but i just couldn't explain on the graphs i simulated.
With the need for higher sampling frequencies, power electronics control engineers are moving some of their controller implementations to FPGAs or FPGA-based SoCs. Besides the use of wide-band gap semiconductors (GaN and SiC), what other reasons are driving the need for higher controller sampling frequencies? Let us know your thoughts.
If you have not seen this yet, in Release 2018b we added several examples to Simulink Control Design that show how to use this product to tune the gains of field-oriented controllers.
The first two examples make use of Closed-Loop PID Autotuner block . We show how to use this block to tune multiple loops in the motor control system, one loop at a time.
One of the examples shows tuning the controller gains for a PMSM:
Tune Field-Oriented Controllers Using Closed-Loop PID Autotuner Block
The other example shows how to tune four loops for an asynchronous machine (inductance motor):
Tune Field-Oriented Controllers for an Asynchronous Machine Using Closed-Loop PID Autotuner Block
This approach works well when you have initial gains that provide stable response, and you want to fine tune the controller to improve performance.
What do you do when you start with a new design and need to design your controller from scratch? That is what the third example is showing. Here we design all 3 loops (id, iq, speed) for a PMSM by running an AC sweep to compute a frequency response, then identifying a state-space model using System Identification Toolbox, and finally tuning all 3 loops simultaneously to provide desired performance.
Check it out here:
Tune Field-Oriented Controllers Using SYSTUNE
What do you think about these examples?
Share your opinion.
Arkadiy
Hi there! This is kind of an unusual question, but here it goes. I am a big time Matlab enthusiast and I met some of your representatives at Formula Student Germany back in August. There was a booth were your product was showcased but most importantly there was Matlab merchandise such as stickers, rub-on-tattoos and pens with the mathworks logo being handed out. This merchandise is increadibly popular with me and my nerdy friends. But sadly I didnt bring much with me from the event. Is it possible to get ahold some of it? Is it for sale? Are you willing to sponsor some geeky engineering students?
- the names defined as "keywords" do not in themselves involve function calls to publicly visible routines. These keywords currently include 'break', 'case', 'catch', 'classdef', 'continue', 'else', 'elseif', 'end', 'for', 'function', 'global', 'if', 'otherwise', 'parfor', 'persistent', 'return', 'spmd', 'switch', 'try', 'while'. There is no functional form of any of these: for example, one cannot use global(s) to declare the name contained in the variable "s" to be global. (However, you can define an "end" method; https://www.mathworks.com/help/matlab/matlab_oop/object-end-indexing.html )
- scalar numeric double precision real-valued constants are handled at parse time, including unary plus and unary minus in front of them
- scalar numeric double precision constants followed immediately by "i" or "j" create a complex-value constant at parse time, including unary plus and unary minus in front of them
- whether a complete complex constant with real and imaginary part is handled at parse time is unknown
- literal character vectors and string objects are handled at parse time
- in sufficiently new versions, int64() and uint64() around an integer constant is handled at parse time. This was a change from previous versions which handled it at run time (after the integer had been converted to double precision...)
- whether any other casts such as uint16() or logical() are now handled at parse time is unknown
- assignment of a compete variable (no indexing, no substructure references, etc.) to a plain variable (no indexing, no substructure references, etc.) does not involve any function calls to publicly visible routines (unless I have overlooked a case involving objects)
- "if" or "while" applied to a scalar logical constant or to a scalar logical variable does not involve any function calls to publicly visible routines. However, it is not known whether there is any method to construct a logical value without calling a MATLAB routine: "true" and "false" are MATLAB routines, not constants, and logical() of a numeric constant might be handled at run time
- "for" in which the range is named as a scalar constant or scalar variable do not involve any function calls to publicly visible routines; for example, "for K = 5"
- defining an anonymous function does not involve any function calls to publicly visible routines