太阳能电池特性及其应用

news2024/10/13 0:35:50

中南民族大学-通信工程2024-大学物理下实验

目录

  • 代码实现
  • 结果显示


🛠工具使用
MarsCode(插件,集成在PyCharm);
python编程(豆包AI智能体)

💻编程改进
此处是用「Matplotlib」来作图,时间有限未能完全还原老师的要求。后面将尝试用「Seaborn」 。
「Seaborn」 继承了「Matplotlib」 的强大功能,同时提供了更高级的接口和更美观的默认样式;而且易于使用,代码简洁。

代码实现

# 太阳能电池特性
import math
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats

# 单晶硅
U = [0.0, 0.5, 1.0, 1.5, 2.0,
     2.2, 2.4, 2.6, 2.8, 3.0,
     3.2, 3.4, 3.6]
I1 = [0, 0.011, 0.022, 0.036, 0.051,
      0.058, 0.066, 0.074, 0.083, 0.094,
      0.107, 0.124, 0.145]
lnI1 = []
for i in range(len(I1)):
    if i == 0:
        continue
    lnI = math.log(I1[i])
    lnI1.append(lnI)
    # print(f'{lnI:.2f}')

# 多晶硅
I2 = [0, 0.002, 0.005, 0.012, 0.023,
      0.029, 0.036, 0.045, 0.055, 0.067,
      0.082, 0.098, 0.116]
lnI2 = []
for i in range(len(I2)):
    if i == 0:
        continue
    lnI2.append(math.log(I2[i]))
    # print(
    #     f"i{i+1:<2} = {I2[i]}  lnI{i+1:<2} = {lnI:.2f}"
    # )

# 非晶硅
I3 = [0, 0.001, 0.006, 0.050, 0.140,
      0.245, 0.396, 0.582, 0.807, 1.280,
      2.7, 6.1, 12.9]
lnI3 = []
for i in range(len(I3)):
    if i == 0:
        continue
    lnI3.append(math.log(I3[i]))
    # print(
    #     f"i{i+1:<2} = {I3[i]}  lnI{i+1:<2} = {lnI:.2f}"
    # )


# 线性拟合求理想因子
# 转换为numpy数组
U = np.array(U[4:])
lnI1 = np.array(lnI1[3:])
lnI2 = np.array(lnI2[3:])
lnI3 = np.array(lnI3[3:])
# 绘制散点图
plt.subplot(3, 2, 2)
plt.scatter(U, lnI1, label='mc-Si')
plt.scatter(U, lnI2, label='pc-Si', marker='s')
plt.scatter(U, lnI3, label='a-Si', marker='^')
# 线性拟合
slope1, intercept1, r_value1, p_value1, std_err1 = stats.linregress(U, lnI1)
slope2, intercept2, r_value2, p_value2, std_err2 = stats.linregress(U, lnI2)
slope3, intercept3, r_value3, p_value3, std_err3 = stats.linregress(U, lnI3)
# 绘制线性拟合曲线
plt.plot(U, slope1 * U + intercept1, color='blue')
plt.plot(U, slope2 * U + intercept2, color='red')
plt.plot(U, slope3 * U + intercept3, color='green', linestyle='--')
plt.plot(U, lnI3, color='green')
# 添加图例和标签
plt.annotate(f"y={slope3:.2f}x{intercept3:.2f}\nR²={r_value3:.2f}", xy=(3.5, 1.6))
plt.annotate(f"y={slope2:.2f}x{intercept2:.2f}\nR²={r_value2:.2f}", xy=(3.5,-4))
plt.annotate(f"y={slope1:.2f}x{intercept1:.2f}\nR²={r_value1:.2f}", xy=(U[1],lnI1[1]))
plt.grid(True)
plt.title('Linear fitting for device\'s ideal factor')
plt.legend()
plt.xlabel('U/V')
plt.ylabel('lnI')
# 显示图形
print(f"Linear Fit Slope: {slope1}  n:{26 / slope1}")
print(f"Linear Fit Slope: {slope2}  n:{26 / slope2}")
print(f"Linear Fit Slope: {slope3}  n:{26 / slope3}")


# 太阳能电池暗态伏安特性
# 转换为numpy数组
U = [0.0, 0.5, 1.0, 1.5, 2.0,
     2.2, 2.4, 2.6, 2.8, 3.0,
     3.2, 3.4, 3.6]
U = np.array(U)
ax1 = plt.subplot(3, 2, 1)

# 创建第一个 y 轴
ax1.scatter(U, I1, label='mc-Si')  # 单晶硅
ax1.plot(U, I1)  # 单晶硅
ax1.scatter(U, I2, marker='s',label='pc-Si')
ax1.plot(U, I2, )  # 多晶硅
ax1.set_xlabel('U/V')
ax1.set_ylabel('I/mA')

# 创建第二个 y 轴
ax2 = plt.twinx()
ax2.scatter(U, I3, color='green', marker='^', label='a-Si')
ax2.plot(U, I3, color='green')  # 非晶硅
# 添加箭头
# ax2.annotate("",xy=(3.5,5), xytext=(U[-2],I3[-2]), arrowprops=dict(facecolor='black'))

ax1.grid(True)
lines, labels = ax1.get_legend_handles_labels()
lines2, labels2 = ax2.get_legend_handles_labels()
ax2.legend(lines + lines2, labels + labels2, loc='upper left')
plt.title('Solar cell dark state voltage-current characteristic')


# 光照下太阳能电池输出特性
# 单晶硅
I11 = [0.061, 0.603, 1.492, 3.0, 5.8,
       7.2, 9.4, 11.1, 13.5, 16.5,
       20.0, 20.5, 20.5, 20.6, 20.8,
       20.9, 21.2, 21.2, 21.3, 21.5]
U11 = [6.11, 6.05, 6.01, 5.95, 5.84,
       5.77, 5.68, 5.61, 5.43, 5.00,
       4.02, 2.06, 1.66, 1.25, 0.84,
       0.43, 0.22, 0.14, 0.03, 0.01]
P1 = []
for i, u in zip(I11, U11):
    p = i * u
    # print(f"i = {i:.2f}  U = {u:.2f} P = {p:.2f}")
    P1.append(p)

# 多晶硅
I22 = [0.057, 0.573, 1.425, 2.7, 5.0,
       6.2, 8.0, 9.4, 11.4, 14.4,
       18.9, 24.3, 24.6, 24.7, 24.7,
       24.7, 24.6, 24.5, 24.5, 24.4]
U22 = [5.78, 5.77, 5.75, 5.35, 5.07,
       4.97, 4.82, 4.72, 4.58, 4.34,
       3.80, 2.46, 1.994, 1.504, 1.01,
       0.512, 0.264, 0.166, 0.04, 0.018]
P2 = []
for i, u in zip(I22, U22):
    p = i * u
    # print(f"i = {i:<5.2f}  U = {u:.2f} P = {p:.2f}")
    P2.append(p)

# 非晶硅
I33 = [0.031, 0.306, 0.760, 1.502, 3.0,
       3.7, 4.8, 5.6, 6.7, 8.2,
       9.6, 10.5, 10.6, 10.7, 10.6,
       10.7, 10.6, 10.7, 10.8, 10.8]
U33 = [3.1, 3.08, 3.06, 3.03, 2.97,
       2.93, 2.87, 2.81, 2.7, 2.47,
       1.93, 1.06, 0.852, 0.69, 0.428,
       0.22, 0.113, 0.072, 0.018, 0.008]
P3 = []
for i, u in zip(I33, U33):
    p = i * u
    # print(f"i = {i:<5.2f}  U = {u:.2f} P = {p:.2f}")
    P3.append(p)

# 输出功率和输出电压的关系
plt.subplot(3, 2, 5)
plt.scatter(U11, P1, label='mc-Si')
plt.plot(U11, P1)
plt.scatter(U22, P2, label='pc-Si', marker='s')
plt.plot(U22, P2)
plt.scatter(U33, P3, label='a-Si', marker='^')
plt.plot(U33, P3)

plt.grid(True)
plt.legend()
plt.title('Output power and output voltage relationship')
plt.xlabel('U/V')
plt.ylabel('P/mW')

# 光照下的太阳能电池输出特性
plt.subplot(3, 2, 6)
plt.scatter(U11, I11, label='mc-Si')
plt.plot(U11, I11)
plt.scatter(U22, I22, label='pc-Si', marker='s')
plt.plot(U22, I22)
plt.scatter(U33, I33, label='a-Si', marker='^')
plt.plot(U33, I33)

plt.grid(True)
plt.legend(loc='upper right')
plt.title('Output characteristics of solar cells under illumination')
plt.xlabel('U/V')
plt.ylabel('I/mA')

# 光照强度对开路电压的影响
I = [816, 323, 183, 122, 86, 67, 52, 42, 35, 29]
# 单晶硅
Uoc1 = [6.17, 5.82, 5.56, 5.41, 5.30, 5.22, 5.14, 5.08, 5.01, 4.96]
# 多晶硅
Uoc2 = [6.13, 5.82, 5.57, 5.40, 5.27, 5.18, 5.08, 5.01, 4.93, 4.86]
# 非晶硅
Uoc3 = [3.74, 3.38, 3.29, 3.22, 3.16, 3.11, 3.06, 3.01, 2.97, 2.93]

plt.subplot(3, 2, 3)
plt.scatter(I, Uoc1, label='mc-Si')
plt.plot(I, Uoc1)
plt.scatter(I, Uoc2, label='pc-Si', marker='s')
plt.plot(I, Uoc2)
plt.scatter(I, Uoc3, label='a-Si', marker='^')
plt.plot(I, Uoc3)

plt.grid(True)
plt.legend()
plt.title('Impact of light intensity on the open-circuit voltage')
plt.xlabel('I/(W/m²)')
plt.ylabel('Uoc/V')

# 光照强度对短路电流的影响
# 单晶硅
Isc1 = [53.3, 24.7, 16.8, 9.2, 6.8, 5.1, 4.1, 3.4, 2.9, 2.4]
# 多晶硅
Isc2 = [91.8, 36.3, 22.2, 15.3, 11.2, 8.6, 6.7, 5.4, 4.4, 3.7]
# 非晶硅
Isc3 = [38.4, 19.0, 10.7, 7.0, 5.0, 3.8, 2.9, 2.3, 1.9, 1.6]

plt.subplot(3, 2, 4)
plt.scatter(I, Isc1, label='mc-Si')
plt.plot(I, Isc1)
plt.scatter(I, Isc2, label='pc-Si', marker='s')
plt.plot(I, Isc2)
plt.scatter(I, Isc3, label='a-Si', marker='^')
plt.plot(I, Isc3)

plt.grid(True)
plt.legend()
plt.title('Impact of light intensity on the short-circuit current')
plt.xlabel('I/(W/m²)')
plt.ylabel('Isc/mA')

# 调整子图之间的间距
plt.subplots_adjust(hspace=0.5, wspace=0.3)

# 显示图形
plt.show()

结果显示

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2209188.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Monkey测试工具大盘点!如何选怎么用全整明白了!

什么是Monkey测试&#xff1f; 以下是官方说法&#xff1a; Monkey 测试是通过向系统发送伪随机的用户事件流&#xff08;如按键输入、触摸屏输入、手势输入等&#xff09;&#xff0c;实现对应用程序客户端的稳定性测试&#xff1b;这种随机性可以模拟真实用户的行为&#x…

理解Web3的互操作性:不同区块链的连接

随着Web3的迅速发展&#xff0c;互操作性成为区块链技术中的一个核心概念。互操作性指的是不同区块链之间能够无缝地交流和共享数据&#xff0c;从而实现更加高效和灵活的生态系统。本文将探讨Web3中互操作性的意义、面临的挑战以及未来的发展趋势。 1. 互操作性的意义 在Web…

优达学城 Generative AI 课程3:Computer Vision and Generative AI

文章目录 1 官方课程内容自述第 1 课&#xff1a;图像生成简介第 2 课&#xff1a;计算机视觉基础第 3 课&#xff1a;图像生成与生成对抗网络&#xff08;GANs&#xff09;第 4 课&#xff1a;基于 Transformer 的计算机视觉模型第 5 课&#xff1a;扩散模型第 6 课&#xff0…

利用AI大模型,增强你的DevOps!

前言 自从去年春天ChatGPT问世之后&#xff0c;互联网也掀起了拥抱AI的浪潮&#xff0c;不仅是各大头部大厂相继发布大模型产品&#xff0c;在开发者的Coding过程中也紧跟时代&#xff0c;一些热门插件也纷纷受到了开发者的青睐&#xff0c;比如GitHub Copilot的智能代码生成。…

数据结构编程实践20讲(Python版)—05二叉树

本文目录 写在前面:大“树”下好乘凉定义主要术语基本特征主要应用领域:05 二叉树Binary treeS1 说明S2 示例S3 二叉树类型(1)满二叉树(Perfect Binary Tree)(2)完全二叉树(Complete Binary Tree)(3)二叉搜索树(Binary Search Tree)(4)平衡二叉树(Balanced Bin…

Windows环境NodeJS下载配置安装运行

Windows环境NodeJS下载配置安装运行 &#xff08;1&#xff09;下载 Node.js — Run JavaScript Everywhere 安装文件。 一路傻瓜式安装。 如果安装正常&#xff0c;输入命令可显示版本号&#xff1a; &#xff08;2&#xff09;可以查询nodejs默认的后续依赖安装包位置及缓存…

稻盛和夫认为,一个领导是否值得追随,看这几点就够了

一、真正的领导者有自信&#xff0c;但不自大&#xff0c;有坚定的信念和价值观。 稻盛和夫认为&#xff0c;领导者的真正强大之处在于他们能够坚定地做正确的事情。领导者必须具备勇气和决心&#xff0c;以及坚定的信念&#xff0c;以便在面对挑战和困难时能够坚持自己的信念…

Vert.x,Web - 静态资源/模板

静态资源 Vert.x-Web带有开箱即用的处理器(StaticHandler)&#xff0c;用于处理静态Web资源(.html, .css, .js, …)&#xff0c; 因此可以非常轻松地编写静态Web服务器。 默认静态文件目录为类路径下的webroot目录&#xff0c;对于maven的项目&#xff0c;按规范放在src/main/…

BIO与NIO学习

BIO&#xff1a;同步阻塞IO&#xff0c;客户端一个连接请求&#xff08;socket&#xff09;对应一个线程。阻塞体现在: 程序在执行I/O操作时会阻塞当前线程&#xff0c;直到I/O操作完成。在线程空闲的时候也无法释放用于别的服务只能等当前绑定的客户端的消息。 BIO的代码实现 …

郑光荣参加老年春节联欢晚会团长会议现场采访

郑光荣作为北京正明圣达叫卖团的业务团长&#xff0c;他不仅在多个春节联欢晚会中展现了 自己的才华&#xff0c;还在团长会议现场接受了采访。在2024年参加了多个电视台的 春节联欢晚会录制。 郑光荣曾经参与了包括北京广播电视台、海南卫视&#xff0c;中国国际教育电视台…

c++基础-去掉空格

#include <algorithm> #include <string> #include <cctype> // 用于std::isspace std::string removeSpaces(std::string str) {str.erase(std::remove_if(str.begin(), str.end(), ::isspace), str.end());return str; }int main() {string str &quo…

腾讯云视立方Flutter 相关

两台手机同时运行 Demo&#xff0c;为什么看不到彼此的画面&#xff1f; 请确保两台手机在运行 Demo 时使用的是不同的 UserID&#xff0c;TRTC 不支持同一个 UserID &#xff08;除非 SDKAppID 不同&#xff09;在两个终端同时使用。 防火墙有什么限制&#xff1f; 由于 SDK…

visual studio使用ssh连接linux虚拟机运行程序

1.vs安装linux组件 2.安装后新建项目 新建后会有一个使用指南 设置网络为桥接网卡后打开虚拟机 使用vs提升的那句话安装工具 sudo apt-get install openssh-server g gdb gdbserver 重启ssh服务 sudo service ssh restart 接着进去打开ssh端口 sudo vi /etc/ssh/sshd_config …

安装rstudio-server

主要教步骤参考https://posit.co/download/rstudio-server/ 1&#xff0c;首先是linux发行版版本要求&#xff1a;符合 2&#xff0c;预装R&#xff1a;符合 3&#xff0c;安装rstudio-server 4&#xff0c;但是发现web上8787端口打不开&#xff1a; RStudio Server 可能没有在…

不会大模型不要紧!只需5分钟!你也可以微调大模型!如何快速微调Llama3.1-8B

AI浪潮席卷全球并发展至今已有近2年的时间了&#xff0c;大模型技术作为AI发展的底座和基石&#xff0c;更是作为AI从业者必须掌握的技能。但是作为非技术人员&#xff0c;相信大家也有一颗想要训练或微调一个大模型的心&#xff0c;但是苦于技术门槛太高&#xff0c;无从下手。…

Chromium 如何查找V8 引擎中JavaScript 标准内置对象

JavaScript 标准内置对象 - JavaScript | MDN (mozilla.org) 一、JavaScript 标准内置对象 本章介绍和说明了 JavaScript 中所有的标准内置对象、以及它们的方法和属性。 这里的术语“全局对象”&#xff08;或标准内置对象&#xff09;不应与 global 对象混淆。这里的“全局…

【Canvas与标牌】内凹圆角矩形排列组合标牌

【成图】 【代码】 <!DOCTYPE html> <html lang"utf-8"> <meta http-equiv"Content-Type" content"text/html; charsetutf-8"/> <head><title>内凹圆角矩形Draft3排列组合标牌</title><style type"…

云轴科技ZStack邀您参加迪拜GITEX 2024,10月14日不见不散

云轴科技ZStack期待在GITEX GLOBAL 2024与您相遇&#xff0c;共同探索科技的未来。 10月14日至18日&#xff0c;ZStack将携最新的云计算解决方案与AIOS智塔平台&#xff0c;亮相全球顶尖科技盛会——GITEX GLOBAL 2024 展览会&#xff0c;展位Hall 8-C20&#xff0c;向全球观众…

Git客户端使用之TortoiseGit和Git

git客户端有两个分别是TortoiseGit和Git Git用于命令行TortoiseGit用于图形界面。无论是Git还是TortoisGit都需要生成公/私钥与github/gitlab建立加密才能使用。 一、先介绍Git的安装与使用 1、下载与安装 安装Git-2.21.0-64-bit.exe(去官网下载最新版64位的)&#xff0c;安…

阿里P8面试官推荐学习的11大专题:java面试精讲框架文档

本篇文章给大家分享一波&#xff0c;阿里P8面试官推荐学习的11大专题&#xff1a;java面试精讲框架文档&#xff0c;主要包含11大块的内容&#xff1a;spring、springcloud、netty、zookeeper、kafka、Hadoop、HBASE、Cassandra、elasticsearch、spark、flink&#xff1b;希望大…