Difference in capacitance results: COMSOL vs MATLAB

Please login with a confirmed email address before reporting spam

Hello everyone, I hope you're all doing well. I'm facing a significant challenge and would greatly appreciate it if you could help me out.

The capacitance I obtain for my structure using COMSOL is 38 femtofarads, but when I calculate the same structure in MATLAB, the capacitance increases to 54 femtofarads. I know that COMSOL takes fringing fields into account when calculating capacitance.

If anyone has experience with this or can help me identify where the issue might be, I would be truly grateful.

Thank you very much in advance!


5 Replies Last Post 2024年12月18日 GMT-5 10:41
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年12月16日 GMT-5 15:29
Updated: 2 months ago 2024年12月16日 GMT-5 16:22

Hello Amir,

It seems like you have already figured the reason for the difference between your two results: I interpret your post as meaning that your MATLAB computation and your COMSOL computation are based on different hypotheses about the electrostatic fields. If a model ignores the effect of fringing fields (presumably because it assumes the capacitor's gap to be infinitely small compared to its other two dimensions), you should expect it to produce a different result than a model that accounts for the fact that the capacitor's gap is in fact finite.

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Amir, It seems like you have already figured the reason for the difference between your two results: I interpret your post as meaning that your MATLAB computation and your COMSOL computation are based on different hypotheses about the electrostatic fields. If a model ignores the effect of fringing fields (presumably because it assumes the capacitor's gap to be infinitely small compared to its other two dimensions), you should expect it to produce a different result than a model that accounts for the fact that the capacitor's gap is in fact finite. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年12月17日 GMT-5 08:09
Updated: 2 months ago 2024年12月17日 GMT-5 08:11

Dear Jeff, Thank you for your response and clarification. The structure of my sensor is based on variable area for capacitance calculation, while the gap remains fixed. In fact, I performed the MATLAB calculations using classical formulas for capacitance computation, considering the three parts (1, 2, and 3) as shown in Figure 1. Unfortunately, the difference between the capacitance values computed in MATLAB and COMSOL still exists. Using the classical formulas: • The capacitance calculated in MATLAB equals 54 femtofarads, while the capacitance obtained from COMSOL for a bias of 1g (acceleration) is 38 femtofarads. Next, as shown in Figure 2, I modified my MATLAB calculations by using the formula provided in Figure 2 specifically for part 3, while for parts 1 and 2, I continued using the formulas from Figure 1. With this adjustment: The capacitance computed in MATLAB equals 49 femtofarads, but the capacitance obtained in COMSOL remains 38 femtofarads for the same bias of 1 g. "As a side note, the formula used in Figure 2 (part 3) is specifically applied to calculate the capacitance of parallel plates with varying areas." In your opinion, is this formula applicable to our structure? Despite this refinement in the MATLAB calculations, the difference between the MATLAB and COMSOL results persists. Given this, I have the following questions: 1. Is the difference between the MATLAB and COMSOL results expected and within an acceptable range? 2. What would you suggest as a solution to align the MATLAB calculations with the COMSOL model so that fringing fields are accounted for more accurately? And please kindly let me know if you have any suggestions for reducing this difference or if additional steps are required to align the MATLAB calculations with the COMSOL results. Bests, Amir![https://drive.google.com/file/d/1Ui3r-XKwp8TRIi6ikueGQ0gZrzapw_Dn/view?usp=drive_link]

Dear Jeff, Thank you for your response and clarification. The structure of my sensor is based on variable area for capacitance calculation, while the gap remains fixed. In fact, I performed the MATLAB calculations using classical formulas for capacitance computation, considering the three parts (1, 2, and 3) as shown in Figure 1. Unfortunately, the difference between the capacitance values computed in MATLAB and COMSOL still exists. Using the classical formulas: • The capacitance calculated in MATLAB equals 54 femtofarads, while the capacitance obtained from COMSOL for a bias of 1g (acceleration) is 38 femtofarads. Next, as shown in Figure 2, I modified my MATLAB calculations by using the formula provided in Figure 2 specifically for part 3, while for parts 1 and 2, I continued using the formulas from Figure 1. With this adjustment: The capacitance computed in MATLAB equals 49 femtofarads, but the capacitance obtained in COMSOL remains 38 femtofarads for the same bias of 1 g. "As a side note, the formula used in Figure 2 (part 3) is specifically applied to calculate the capacitance of parallel plates with varying areas." In your opinion, is this formula applicable to our structure? Despite this refinement in the MATLAB calculations, the difference between the MATLAB and COMSOL results persists. Given this, I have the following questions: 1. Is the difference between the MATLAB and COMSOL results expected and within an acceptable range? 2. What would you suggest as a solution to align the MATLAB calculations with the COMSOL model so that fringing fields are accounted for more accurately? And please kindly let me know if you have any suggestions for reducing this difference or if additional steps are required to align the MATLAB calculations with the COMSOL results. Bests, Amir![https://drive.google.com/file/d/1Ui3r-XKwp8TRIi6ikueGQ0gZrzapw_Dn/view?usp=drive_link]

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年12月17日 GMT-5 15:55
Updated: 2 months ago 2024年12月17日 GMT-5 16:59

Hello Amir,

I was not able to access the files; I would recommend you post them directly into this thread. With that said, your post does suggest to me that your MATLAB methodology presumes some form of simplification that is not made in the COMSOL model, resulting in different results.

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Amir, I was not able to access the files; I would recommend you post them directly into this thread. With that said, your post does suggest to me that your MATLAB methodology presumes some form of simplification that is not made in the COMSOL model, resulting in different results. Best regards, Jeff

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年12月18日 GMT-5 03:25

Hello Jeff, Thank you so much for your response. I will definitely upload the file here. Bests, Amir,

Hello Jeff, Thank you so much for your response. I will definitely upload the file here. Bests, Amir,


Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年12月18日 GMT-5 10:41
Updated: 2 months ago 2024年12月18日 GMT-5 14:26

Thanks, Amir. So, yes, it is as I suspected: your MATLAB methodology is based on analytical expressions. With PDEs, analytical solutions are typically only available for very specific geometries (simple shapes, etc) and physical assumptions. Stretching their use to a case where those simplifications are not fully satisfied is certainly something that is commonly done in engineering, and it can frequently yield very useful information about a system. Unfortunately, it is hard to predict how far off the resulting values are going to be from the exact solution. When possible, solving the PDEs with a tool like COMSOL yields more accurate values due to fewer or less stringent simplifications being made. The ~20% difference between your two results (49fF vs 38fF) does not strike me as unusual.

Best,

Jeff

-------------------
Jeff Hiller
Thanks, Amir. So, yes, it is as I suspected: your MATLAB methodology is based on analytical expressions. With PDEs, analytical solutions are typically only available for very specific geometries (simple shapes, etc) and physical assumptions. Stretching their use to a case where those simplifications are not fully satisfied is certainly something that is commonly done in engineering, and it can frequently yield very useful information about a system. Unfortunately, it is hard to predict how far off the resulting values are going to be from the exact solution. When possible, solving the PDEs with a tool like COMSOL yields more accurate values due to fewer or less stringent simplifications being made. The ~20% difference between your two results (49fF vs 38fF) does not strike me as unusual. Best, Jeff

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.