Main Content

Results for


"The model is configured to create a SIL block, which is not supported for the selected hardware board. To resolve this, search for 'Create block' in the Configuration Parameters dialog box and set it to 'None' or 'PIL'.
I am facing an issue in data store memory block using store memory Read and write Block in matlab simulink. I have attached the screen short in which the posed error has been depicted.
Hello,
i want to implement a Energy Storage System with a Battery and a Supercapacitor, where the Supercapacitor comes in when the Battery has a short circuit for an emergency system. How can i implement something like this ? I think the right way is to implement a function where a switch is controlled by the SOC of the two storage systems or ?
Hi, I am currently studying the effects of varying switching frequency towards the inverter and motor system efficiency. I am using the three-phase converter which the gate signal is sent by a PWM generator. Inside the PWM generator block, there is switching frequency parameter. Therefore, is it possible if I can tune the value of switching frequency by making it as input and receving the signal in Matlab Simulink similar with Vabc and Vdc instead of tuning from Matlab code?
Hope to receive any comment or suggestion. Thank you.
Need some guidance on how to model the mutual inductance model from Simscape. The secondary side does not receive the voltage.
This is the 6th installment of the wish-list and bug report thread.
This topic is the follow on to the first Wish-list for MATLAB Answer sections and second MATLAB Answers Wish-list #2 (and bug reports). The third started out as New design of the forum - grey on white and the fourth and fifth also grew so large they are slow to load and navigate.
Same idea as the previous ones: one wish (or bug report) per answer, so that people can vote their wishes.
What should you post where?
Wishlist threads (#1 #2 #3 #4 #5 #6): bugs and feature requests for Matlab Answers
Frustation threads (#1 #2): frustations about usage and capabilities of Matlab itself
Missing feature threads (#1 #2): features that you whish Matlab would have had
Next Gen threads (#1): features that would break compatibility with previous versions, but would be nice to have
@anyone posting a new thread when the last one gets too large (about 50 answers seems a reasonable limit per thread), please update this list in all last threads. (if you don't have editing privileges, just post a comment asking someone to do the edit)
I want to understand this from the scratch, i will appreciate help and guidance very much.
When solving problems over on Cody, I can almost always view all solutions to a problem after submitting a correct solution of my own. Very rarely, however, this is not the case, and I instead get the following message:
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
You may solve another problem from Community group to unlock all the solutions to this problem.
If this happens, then again, I can almost always rectify this by submitting a (correct) solution to a different problem (I take it that the Community group is the implicit group of all problems on Cody --- is it?). But sometimes that, too, fails.
So my question is, why? What are the criteria that determine when all solutions are, in fact, unlocked?
(There is a related question here, but I feel the posted answer does not answer the question.)
Simple question: I noticed there's a Modeling & Simulation Challenge Master badge over on Cody, but I can't find the corresponding group. So: where is it? Does it still exist at all?
Hi, having problems with this model. Tried changing all the capacitor values without any success. Any help/suggestions would be most welcome.
There are two kinds of text data type (=string data type) in MATLAB:
Text1='aText'; % first one
Text2="aText"; % first one
The second one did not exist in "old" MATLAB versions but the first one only.
My questions are: 1) What was motivation of MathWorks programmers to introduce the Text Data Type of the second format?
Yes, I know the difference: length(Text1)=5 whilst length(Text2)=1; Text1(2)='T' but Text2(2) does not exist. The array Text3=['one' ; 'fifth'] does not exist too.
2) However, any explanations and recommendations how to apply the second sort in contrast to the first one?
3) Is there any way how to convert one sort to another one?
Thanks for explanation in advance!
Error: The server timed out while running and assessing your solution in MATLAB CODY. How do I resolve this? My code is correct. I have run it on PC. But, when i submit in CODY the server throws an error.
I've now seen linear programming questions pop up on Answers recently, with some common failure modes for linprog that people seem not to understand.
One basic failure mode is an infeasible problem. What does this mean, and can it be resolved?
The most common failure mode seems to be a unbounded problem. What does this mean? How can it be avoided/solved/fixed? Is there some direction I can move where the objective obviously grows without bounds towards +/- inf?
Finally, I also see questions where someone wants the tool to produce all possible solutions.
A truly good exposition about linear programming would probably result in a complete course on the subject, and Aswers is limited in how much I can write (plus I'll only have a finite amount of energy to keep writing.) I'll try to answer each sub-question as separate answers, but if someone else would like to offer their own take, feel free to do so as an answer, since it has been many years for me since I learned linear programming.
Hello,
I am trying to do image to image regression neural network training. In place of digitTrain4DArrayData, I have used my own dataset of 500 input and 500 output grayscale images of size 100*100 pixels for training.
The code is as follows:
imds1 = datastore(fullfile(matlabdrive,"T10itTI"),"IncludeSubFolders",true,...
"FileExtensions",".png","type","image");
imds2 = datastore(fullfile(matlabdrive,"TFiSTI"),"IncludeSubFolders",true,...
"FileExtensions",".png","type","image");
dsnew = combine(imds1,imds2);
layers = [
imageInputLayer([100 100 1])
batchNormalizationLayer
reluLayer('Name','relu_1')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_2')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_3')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_4')
convolution2dLayer(1,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_5')
convolution2dLayer(3,1,'Stride',2)
batchNormalizationLayer
reluLayer('Name','relu_6')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_7')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_8')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_9')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_10')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_11')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_12')
convolution2dLayer(1,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_13')
transposedConv2dLayer(1,1,'Stride',2)
batchNormalizationLayer
reluLayer('Name','relu_14')
convolution2dLayer(1,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_15')
convolution2dLayer(1,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_16')
convolution2dLayer(3,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_17')
convolution2dLayer(1,1,'Stride',1)
batchNormalizationLayer
reluLayer('Name','relu_18')
transposedConv2dLayer(3,1,'Stride',2)
fullyConnectedLayer(1)
regressionLayer
]
lgraph = layerGraph(layers);
options = trainingOptions("adam", ...
InitialLearnRate=8e-3, ...
SquaredGradientDecayFactor=0.99, ...
MaxEpochs=20, ...
MiniBatchSize=64, ...
Plots="training-progress")
net=trainNetwork(dsnew, lgraph, options);
On running the code, I get following error:
Error using trainNetwork Invalid training data. The output size ([1 1 1]) of the last layer does not match the response size ([1 1 1972224]).
When I use fullyConnectedLayer(1972224) in place of fullyConnectedLayer(1), I get following error:
Error using trainNetwork Layer 'fc': Invalid initializer. Requested 1972224x17161 (252.2GB) array exceeds maximum array size preference (5.0GB). This might cause MATLAB to become unresponsive.
Error in mt1tt1 (line 95) net=trainNetwork(dsnew, lgraph, options);
Caused by: Error using nnet.internal.cnn.assembler.InitializeMixin/initializeLearnableParameters Layer 'fc': Invalid initializer. Requested 1972224x17161 (252.2GB) array exceeds maximum array size preference (5.0GB). This might cause MATLAB to become unresponsive.
Can you suggest correction in code?
Thankyou
Hi Fellow Users,
I am Muthuserpi From A begginer of Optics studio Please anyone help me how to add two diffeaction reflective grating and How to tilt and decenter in matlab simulation
Thanks And Regards
S.Muthuserpi
Just in case, I have my license of MATLAB. I just have this question and I didn't find any information. I wouldn't like to create another account, for this reason I prefer to ask here.
Hello Community,
For E vehicle application to control the speed and torque of PMSM motor I am implementing FOC algorithm. We know that to arrive at Speed set point we have speed control loop which is outer loop, Further PI CONTROLLER of speed loop will give reference for Iq current which regulates the current using current loop. My question is 1.How to arrive at Torque set point?
2. Is speed control using FOC is enough or we should implement Torque control algorithm also?
3. should we have speed mode and Torque mode selection in case of constant speed requirement during cruise mode and high torque requirement during uphill situation respectively
4. To arrive at Torque set point what is the relation or transfer function to tune PI controller for Torque loop?
Please give your valuable inputs and answers, thanks in advance
Hello Academia,
I've been trying to get information regarding these configuraitons in a 3 phase transformer. The first is a dual secondary consisting of a wye output and delta output. Both feed separate 3 phase bridges, which outputs are connected in parallel.
The second is a Wye output, which each leg feeds 3 more series windings, which are located on the adjacent core (phase shifted) on the same transformer, with only one 3 phase bridge for the output
I see there is a zigzag simulink but can't seem to get that loaded...
My question is, are these essentially identical in operation, or is the dual secondary what I should be using? (due to better harmonic rejection)
Thanks,
Bryan
Hello,
I am designing a battery model and its control to undergo cyclic charge and discharge.
The battery model is created by using a simscape electrical battery block (Table-based).
The control is modeled using Stateflow. The statflow chart takes SOC values as inputs and provide current values as outputs. By default, the battery will be at rest and no current is drawn at that state (I=0A). And then based on the SOC % of the battery, it goes to charge (3A current) or discharge (-3A current) state. I have defined the controls as follows.
  • If the battery has SOC >= 50%, it has to discharge. If the battery has SOC < 50%, it has to charge.
  • While discharging, if the battery reaches 0% SOC, it goes to rest.
  • While charging, if the battery reaches 100% SOC, it goes to rest.
I have defined initial SOC as 50%.
When I run the simulation, the battery started to discharge as per the condition provided in the stateflow chart.
I = -3
But the battery has not come to rest state after reaching 0% S0C.
I am getting a warning that,
At time 1944.017100, one or more assertions are triggered. State of charge must be greater than or equal to zero. The assertion comes from: Block path: Example_cell_model/Battery (Table-Based)1Assert location: o (location information is protected)
I don't understand why the battery has not came back to rest state.
Do anyone has any idea for the cause of this problem and how to resolve it?
Thanks in advance.
I need to model temperature rise of a resistor due to joule heating with a variable supply or a variable resistor. Is there a simulink component that can be used for this or it has to be implemented with the physical equations fed into block diagrams?
Can someone help give an idea of how this can be modeled?