Nanoscale and macroscale characterization of the dielectric charging phenomenon and stiction mechanisms for electrostatic MEMS/NEMS reliability