how to supply step input to N-Channel MOSFET

14 views (last 30 days)
I havea MOSFET and I want to give a step input to it. so I tried with both "step" generator and "PS Step" (from Simscape). All i get is red dashed line. i tried passing through both PS to Simulink and Simulink to PS with same effect. So my question is how to give step input to N-Channel MOSFET? I want to input to be 1.8V after some time (it does not matter if it goes to 1.8V at 1s or 1ns but it should be 0 at start and then 1.8V).

Answers (1)

Hassaan
Hassaan on 4 Feb 2024
One of the possible solutions steps you can try:
Step 1: Choosing the Right Step Source
  • Simulink Step Block: This block generates a step function in the Simulink environment. It's suitable for simulations purely in Simulink but needs conversion when interfacing with Simscape components.
  • Simscape PS Step Block: This block generates a physical signal step change, directly compatible with Simscape components. This is the preferred choice when your MOSFET is part of a Simscape electrical circuit.
Step 2: Interfacing Between Simulink and Simscape
You may need to convert the Simulink signal into a physical signal using the Simulink-PS Converter block. Conversely, to use a Simscape signal in Simulink, you'd use the PS-Simulink Converter block. However, for directly driving a MOSFET in Simscape, you should use the PS Step Block and avoid unnecessary conversions.
Step 3: Configuring the PS Step Block
To configure the PS Step Block for a step from 0V to 1.8V:
  1. Start Time: Set the time when you want the step to occur. If it doesn't matter whether it's 1s or 1ns, you can set this to a small value (e.g., 1e-3 for 1ms) to simulate almost immediate stepping after the simulation starts.
  2. Step Time: This is the parameter in the PS Step Block where you specify when the step change occurs.
  3. Initial Value: Set to 0.
  4. Final Value: Set to 1.8V.
Step 4: Connecting to the MOSFET
  • Ensure your MOSFET is part of a Simscape electrical circuit.
  • Connect the output of the PS Step Block directly to the gate of the N-Channel MOSFET within your Simscape circuit.
Troubleshooting
  • Check the Simulation Solver: Sometimes, issues arise from the solver configuration. For Simscape models, it's often recommended to use a solver suited for physical systems, like the ODE15s solver.
  • Ensure Compatibility: Verify that all components are correctly connected, with electrical connections made through Simscape electrical ports and not mistakenly through Simulink signal lines.
  • Simulation Errors: If you encounter errors, review the Simulink diagnostic viewer for specific error messages. They can provide insights into mismatches in your simulation setup.
If problems persist, reviewing the detailed error messages provided by Simulink's diagnostic tools can offer further insights into resolving the issue.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.
  2 Comments
Moreshwar Salpekar
Moreshwar Salpekar on 4 Feb 2024
Hello,
I have already mentioned that I tried "Simulink-PS Converter block". the PS end does not connect to MOSFET. it just shows dashed red lines.
My problem, to repeat, is that I need a "step" supply that can provide a 1.8V and it should connect to the N-Channel MOSFET.
The configuration is not a problem. the connection is.
Additionally repetiton: "PS Step" and "Simulink Step" both show same dashed red lines when attempting to connect to the N-Channel-MOSFET.
Please also note that I can connect DC voltage and AC voltage source but not the "Step" or even Simulink Ramp, Sinewave sources when connecting through "Simulink-PS Converter block". The PS end to N Channel MOSFET is all dashed red line.
May be I am missing something that leads to the dashed red line. I was expecting at least the "PS Step" block to connect to the N Channel MOSFET but that is not the case.
Regards
Moreshwar
Waldemar
Waldemar on 12 Mar 2025
hi moreshwar
did you ever find a solution to this?
having the same problem..

Sign in to comment.

Categories

Find more on Simscape Electrical in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!