Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Control logic for mosfet switching


Newbie level 4
Apr 10, 2024
Reaction score
Trophy points
Activity points
Hello everybody.I have to implement the in house circuit cc-ih circuit which is an energy harvester circuit using simscape electrical. The description of the circuit can be found on page 7 of the pdf at Finite element-based assessment of energy harvesting in composite beams with piezoelectric transducers:
As you can see it has a detailed analysis of it, and also its diagram. My simscape implementation so far looks like this:

obviously the control logic needed for the mosfet to turn on/off is missing, cause this is where i am having the trouble. firstly , as the pdf does not metnion the two threshold voltages i should use, what values would you guys suggest. secondly, lets say we know what values we should use, how should i procceed from there. i tried using relation operator with constant blocks to represent the logic but it didnt work since the voltage of the capacitor was coming fully wrong. i also tried the relay block and didnt work either. if any has any idea would be REALLY helpfull.!

just a quick comment about the schematic.

A MOSEFT is controlled by "V_GS" .. the voltage between gate and source.
Thus your "Controlled voltage source" needs to refer to "source", which is also marked as "Electrical reference".
The schematic does not show any reference for the voltage source, so maybe it refers to "Electrical reference" or not.
For proper operation it has to.

Please confirm that the voltage source refers to "source".

the controlled voltage source is just a try of mine to try to create the control logic. i was thinking of two relational operators( one >=Vthreshold 1 and one <=Vthrehshold 2) and then the output of those two into an input of and AND block and then to the controlled voltage source and from there to the gate of the mosfet. so the controlled voltage source may be aboslutely wrong, it was just my idea.
The whole MOSFET section (simple as it is) seems to have
no useful function except to drain the capacitor. I would
imagine that a useful circuit would be an inductor based
boost converter or some other charge pump. A free running,
gated hysteretic control would seem appropriate here, as
you are looking to the cap voltage for your "go button".
so i have not implemented the connection between the elements in the right way? The in-house circuit (Figure 5) consists of a diode rectifierdue to the alternating input current, a capacitor which ischarged by the rectified electric current and a load witha MOSFET switch which discharges the capacitor.The in-house circuit is designed as simple as possiblebecause its main purposes are model validation anddesign exploration. As shown in Figure 5, the circuit consists of a diode rectifier – due to alternating current fromthe oscillating PE transducer – in parallel with a capacitorwhich accumulates charge. The current provided by thePE transducer component is independent of the electriccircuit. A MOSFET acts as a load switch. When it doesnot conduct, the capacitor is charged, else it is dischargedproviding current to the resistive load. Selecting properlythe capacitor capacitance and upper and lower voltagethresholds, different types of loads including batteriescan be powered.
I think what's missing is a description of what you want to do
the charge acquired, when. The later description makes me think
that the capacitor sense would inform some downstream "decision"
that then connects the cap to the load. In that case your sense is
probably a comparator (against reference) and your decision process
may involve "stuff not shown"

However loads often want things like a constant voltage when on,
which is why a harvester bridge would often be followed by a
boost converter / charge pump feeding a larger reservoir and then
maybe another regulation after that (because cap voltage is going
to be all over the place, w/ environment & action).
if someone is able to implement the three piezoelectric energy harvestin circuits using simscape, i could pay him some money for that. if anybody is able of it he can tell me guys, i am really stack at those for months and cant continue.
1. This project is for you to learn Simscape.
2. 2nd goal is to simulate , measure power input & output, understand the time it takes to store 100 uA rms current source, realize harvesting efficiency, where losses go and then if you are good ,design some control system.

I used a web simulator called Falstad, to use a voltager-controlled current source with a frequency slider to reduce wait time with 500 Hz vs 5 and you can change the load as 1k will use up the energy quickly.

I want to see you some effort into learning what I described, because you can't afford my time to do this for you in Simscape. ;)

I was playing around with a control circuit to waiting until it reached 2.5V (Vcc/2) to switch on a Boost regulator, but it was not very efficient in spite of ideal LC parts. (so I cut it out). You can plot anything on the bottom or floating around the schematic. ( voltage or power are common choices, current is not available there.)

The FET RdOn is < 1 ohm there and it has a mouse-controlled logic gate drive.
The level of 100 uArms source cannot drive much power, but you can change anything in this you want and save, undo, redo cut, draw paste, etc, or not. I don't care.
--- Updated ---

I also had back to back 5.6V Zeners to limit the voltage, otherwise if you change the Cap from uF to pF, it will rise up to megavolts quickly. But you can increase it or delete them. (Bridge output)

Here I raised the source to 1mA rms and cut out the extra control circuit attempt. Control Voltage is easy. 0 or 5V. Hard is knowing when to harvest !
spring, summer, winter or only for a week in the fall. (lol)

Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to