COMP0034 2023/24 Coursework 1 specificationPython

Java Python COMP0034 2023/24 Coursework 1 specification (Individual)

Version: 1.0 Released 05/01/24

Contents

1.  Introduction

2.  Getting started

3.  Technologies that must be used

4.  Coursework content

5.  Submission

6.  Marking

7.  Appendices

1.  Adding challenge

2.  Unresolved bugs and code issues

3.  Referencing

4.  Support and guidance

5.  Changes to coursework submission dates

6.  SoRA and EC

7.  Late submission penalties

8.  Data sets

1. Introduction

This document specifies coursework 1 which is worth 50% of the assessment marks available for the module.

In this coursework you will develop and test a REST API application using Python Flask and your allocated data set from COMP0035.

Marks are allocated for:

1.  Application code

2.  Test code

3.  Tools and techniques

2. Getting started

1.  Create a GitHub repository using GitHub classroom:

1.  Login to GitHub.com.

2.  Click on the GitHub classroom link for individuals.

3.  Accept the assignment.

4.  If prompted, accept to join the comp0035-ucl organisation.

2.  Add a copy of your data set from COMP0035 to your repository.

You must only use the data sets as approved for COMP0035.

Which data set to use depends on your circumstances:

 

3. Technologies that must be used

1.  GitHub for source code control.

Use GitHub, with repositories created in GitHub classroom to allow tutors and PGTAs to gain access. If you can’t use GitHub for some reason please contact the course tutor to

agree alternative source code control.

2.  Python coding environment.

Use a Python coding environment such as Visual Studio Code, PyCharm Professional or similar. Jupyter notebooks is not an accepted submission format for the coursework.

3.  Flask python library.

You must use python Flask to create the core REST API app. You may use additional Python libraries to support your work.

4.  Use .pdf or .md format for written content.

All written evidence must be combined into a single file and submitted either as PDF or

markdown. Name this comp0034-coursework1.pdf or comp0034-coursework1.md as appropriate.

4. Coursework content

The minimum requirements for each section are listed below.

See appendices for suggestions to increase the challenge evidenced in your work.

Application code

Write code to create a REST API using Flask that returns data from your data set. The app  code must be submitted with an appropriate file and folder structure for a Flask app. Jupyter notebooks are not accepted.

The minimum required:

·  A Flask app that can be run in development mode from the command line. ·  One GET route.

·  One POST route.

·  One PUT or DELETE route.

·  Interacts with the data set data. The minimum is to read from the .csv/.xslx files. ·  Returns JSON format data.

There is no written evidence expected for this section. However, if there is something you wish

to explain in relation to the code then please add a section called ‘Application code’ to comp0034-coursework1.pdf/md.

Test code

Write code tests for the REST API using pytest and the Flask test client. Code must be submitted as Python files in an appropriate file and folder structure for tests. Jupyter

notebooks are not accepted.

Add evidence of the tests being run to the comp0034-coursework1.pdf/md document in a section named ‘Testing’ .

The minimum required:

·  Two tests for each route in your application.

·  Evidence that the tests have been run (e.g. screenshot).

Use of tools and techniques

Provide evidence of the use of relevant software engineering tools and techniques.

The minimum required:

·  Source code control:

  You must use GitHub for source code control unless otherwise agreed in advance with the course tutor.

  Add the URL of your GitHub repository in a section called ‘Tools and techniques’ in

comp0034-coursework1.pdf/md.

  Demonstrate use of source code control throughout the coursework. Evidenced by commit history in GitHub.

  Appropriate use of .gitignore. Evidence by presence of .gitignore file in GitHub.

·  Provide instructions in README.md which the marker (or any other developer) can use to configure and run your app.

·  Dependency management: Provide a requirements.txt file (or appropriate alternative).

Any additional evidence for this section should be added tocomp0034-coursework1.pdf/md.

References

Add a section called ‘References’ to comp0034-coursework1.pdf/md.

References should include:

·  Acknowledgement of the use of AI

·  Attribution for the data set

·  Code references

·  Books, papers, websites etc. (if used)

See the Appendix - Referencing for details on how to reference each of the above.

5. Submission

Submit your work on Moodle as a single .zip in the assignment submission. Refer to Moodle for the deadline date and time.

Moodle is used as the submission date/time and to authenticate students. GitHub is not an accepted submission system.

The .zip should expand to the correct folder structure with all required files. Ensure that all

files are included in the zip, files that are only provided as URLs will be excluded from marking consideration (since they may be modified after the coursework is submitted). Do not include

virtual environment, venv files please.

The submission must include:

  Application code

  Test code

 comp0034-coursework1.pdf or comp0034-coursework1.md. If using markdown make sure any linked files are also included in the submission.

6. Marking

Mark allocation and calculation

An average module is expected to take around 150 learning hours.

Each coursework should take 20-25 hours.

An indication of the effort given the marking weighting is shown below.

Component

Percentage

Expected hours

App code

55%

11

Test code

35%

7

Tools and techniques

10%

2

Grading criteria

The ‘UCL Computer Science: Marking Criteria and Grade Descriptors’ will be used to assess

the coursework (using only the criteria that are relevant to this coursework). In addition to the standard descriptors, further guidance is given for this coursework in the table below.

As there can be a wide range of solutions it isn’t possible to cover everything you might do to achieve a given level. The following should be used as guidance.

Higher mark bands assume that the criteria from lower bands have been fully achieved.

App code

As a guide, marking considers aspects such as:

  are the minimum requirements met?

  range of skills/sophistication/challenge evidenced in the resulting application code

  code quality: Python standards, structure and configuration of the application, use of

functions and/or classes, DRY and other design principles

 

Test code

As a guide, marking considers aspects such as:

  did you meet the minimum requirements of this section?

  evidence of challenge and&nbsdai 写COMP0034 2023/24 Coursework 1 specificationPython p;sophistication in the test code.

  the quality and structure of the test code. This includes code quality, test naming and structure, documentation, appropriate use of assertions, use of fixtures etc.

 

Tools and techniques

As a guide, marking considers aspects such as:

  Did you meet the minimum requirements of this section?

  Has source code control been used regularly and appropriately?

  Are the dependencies managed using an appropriate technique? Are all the dependencies included?

  Are set up instructions provided? Was the app able to be run after the set-up instructions were followed?

These are not covered by the generic CS grading criteria.

 

Appendices

1.  Adding challenge

2.  Unresolved bugs and code issues

3.  Referencing

4.  Support and guidance

5.  Changes to coursework submission dates

6.  SoRA and EC

7.  Late submission penalties

8.  Data sets

1. Adding challenge

The following are suggestions of things you might do to increase the challenge of your solution. This is not an exhaustive list and other suggestions may be given in the course materials.

Application code

·  More challenging routes (PUT and DELETE).

·  Interacts with a SQLite database using Flask-SQLAlchemy rather than direct to .csv/.xlsx files.

·  Effective error handling (HTTP errors, data interactions etc.).

Test code

·  Test for edge cases

·  Test for error conditions

·  Tests with multiple values

·  More effective/extensive use of fixtures

·  Report on coverage and demonstrate that you understand the report

Tools and techniques

·  Continuous integration (tests, linting)

·  Linting

If you use other tools/techniques please provide screenshots, PDF, or other formats that can be downloaded and included in your zip (these must be able to be opened using freely available

tools). URL links to external sites are not accepted for marking purposes.

2. Unresolved bugs and code issues

There may be problems with your code that you were not able to address in the timescales of the project. This is not unusual either for the coursework or in real life.

If this occurs, add the following to the comp0034-coursework1. (pdf/md) in an ‘Application code’ section, or ‘Testing’ section if it relates to the test code:

·  what the problem is or how it is affecting your app

·  where in the code the issue is

·  what steps you took to try and address the issue

3. Referencing

Acknowledgement of the use of AI

If you did not use AI then clearly state this. Otherwise, you must include the following details:

·  Name and version of the generative AI system used; e.g. ChatGPT-3.5

·  Publisher (company that made the AI system); e.g. OpenAI

·  URL of the AI system.

·  Brief description (single sentence) of context in which the tool was used. 

·  Statement of how the AI influenced your code.

This is based on UCL student guidance on the use of AI. |

Reference your dataset

Include any details to acknowledge your dataset (attribution) to comply with any license condition required for your data set (given in the data set link in COMP0035 Moodle).

Book, journal, web article etc. references

It is unlikely to you will have any but if you do then include them.

For book, journal, and web article references, follow the referencing style you use in your own department (e.g. Harvard, APA). Different departments in UCL use different styles.

Code references

How to cite code

UCL has no single method for referencing code. For the purposes of this coursework use the following.

·  Give the author, URL and the date of retrieval. If you adapted the code, indicate “Adapted from” or “Based on” .

·  Include citations within your code using code comments close to the affected code.

An example:

def play_sound(button_text):

# Adapted from code from 'remdog' on the Plotly Community Forum at

# https://community.plotly.com/t/linking-scatter-plot-elements-to-audio-

files/11908/6

# Accessed 01/02/21

...some code here...

When to cite code

You must cite external sources; including where you copy and then adapt the code. External sources include:

·  user forums e.g. stack overflow

·  open source repositories e.g. GitHub repos where an explicit open source license is stated ·  communities associated with a library e.g. plotly forum

·  course teaching materials

·  official library documentation and tutorials of the python libraries and frameworks

It is not appropriate to copy from other students on the course, past or present.

You do not need to cite:

·  code from the COMP0035 course teaching materials.

·  boilerplate code from the official library documentation of the required python libraries and frameworks that are expected to be used in the coursework e.g. flask, flask-

sqlalchemy.

4. Support and guidance

The assessments start in week 1 (coursework 1) and week 5 (coursework 2) of the course. You are expected to make progress each week.

1.  Moodle activities (online): There are weekly activities and checkpoints in Moodle to guide your progress.

2.  Weekly lab/tutorial sessions  (in person): Module staff will be available to provide support and guidance in weekly lab/tutorial sessions. Use these sessions to complete

activities and then work on your coursework.

3.  Tutor office hours (online): The tutor will be available during a weekly module office hour (see Moodle).

4.  Moodle Q&A (online): You can ask questions at any time in the Moodle Q&A forum where anyone in the course is able to reply. When posting questions about your code,

please post the URL to your repository. This enables the tutor and PGTAs to see your  code which is usually essential for solving technical problems! Other students won’t be    able to access your repository from this URL so long as your repository is private and is within the ucl-comp0035 organisation.

5. Changes to the coursework submission date

Coursework submission dates are set centrally in Computer Science and not by the course tutor.

These have been planned carefully to fit with the teaching schedule.

Requests to change these for all students must be made to thecourse tutor who will then

forward the request to the relevant authority in the computer science department. Requests must be supported with appropriate evidence of the need for change.

6. SoRA and EC

If you have an approved extension resulting from a SoRA or EC, these will be carefully checked by the teaching and learning team before marks are entered in portico.

However, the deadlines in Moodle may not be modified for individuals, so it may appear on

Moodle that your submission is late even though you have an approved extension to cover the period.

7. Late submission penalties

Late submission rules apply to all assessments.

Any penalties for late submission are applied by the computer science teaching and learning team when marks are entered in portico.

The mark you see in the Moodle gradebook may not be your final mark as it is the mark before moderation or any penalty has been applied.

8. Data sets

Only use the ethics approved data sets.

The data sets allocated to students on this course have been approved by the Computer Science Ethics Committee and signed by the Head of Department for use in this course. These data

sources comply with GDPR and UCL ethics and data protection policies. You must not use any other data set for the coursework.

The approved data sets do not require data protection registration and since you will not be working with participants in your project there is no requirement to complete any further

training relating to data protection and GDPR         

内容概要:本文研究了基于有限控制集模型预测控制(FCS-MPC)的三相并网逆变器双模态调控策略,深入探讨了电流与功率双模式预测控制之间的等效机理及其性能边界。通过Simulink仿真平台与Matlab编程实现,构建了一个融合电流预测和功率预测的闭环控制系统,旨在提升逆变器在复杂电网环境下的动态响应能力、电能质量和并网稳定性。文章系统阐述了FCS-MPC的基本原理及其在三相并网系统中的应用,提出了一种兼顾稳态精度与动态抗扰性的双模态控制架构,并通过多工况仿真验证了该策略在抑制电流畸变、实现功率无差拍响应等方面的优越性能,揭示了其在高渗透率新能源系统中稳定并网的应用潜力。; 适合人群:具备一定电力电子与自动控制理论基础,从事新能源发电、微电网控制、电力系统仿真等相关领域的科研人员及工程技术人员,尤其适合研究生及以上学历或工作1-3年的研发人员; 使用场景及目标:①用于研究三相并网逆变器在电网不平衡、电压波动等非理想条件下的高性能控制策略;②为实现高渗透率新能源系统的稳定并网提供技术参考与仿真验证手段;③支持学术论文复现、课题研究及工程项目前期技术探索; 阅读建议:建议结合提供的Simulink模型与Matlab代码进行同步仿真操作,深入理解双模态预测控制的设计逻辑与参数整定方法,重点关注不同工况下的系统响应特性,以掌握其在实际应用中的优势与局限性。
内容概要:本文聚焦电网故障下分布式能源系统的多目标无功优化问题,以并网转换器(GCC)为核心,提出并实现了基于Matlab/Simulink的高性能控制策略仿真方案。研究采用有源中点箝位(ANPC)三电平逆变器拓扑,结合双极性倍频脉宽调制(DPWMA)、正负序分离锁相环与电网电压前馈控制,构建一体化控制体系,旨在提升系统在电网电压不平衡、对称跌落及动态扰动等复杂工况下的并网电能质量、动态响应速度与运行稳定性。通过多场景仿真验证,该方案能有效抑制谐波、稳定中点电位、实现对称并网电流与平滑功率输出,尤其在电网不平衡和动态切换条件下展现出卓越的抗扰能力和快速恢复特性,为高比例新能源并网提供了可靠的技术路径。; 适合人群:具备电力电子、自动控制或新能源并网等相关专业背景,从事电力系统仿真研究、攻读硕士及以上学位或从事新能源并网技术研发的工程技术人员。; 使用场景及目标:①深入研究高比例新能源接入背景下并网逆变器在电网故障时的无功支撑与稳定控制机制;②掌握ANPC三电平拓扑与先进调制、锁相、前馈控制技术的协同设计方法;③通过Matlab/Simulink搭建复杂电力系统仿真模型,服务于科研项目开发、高水平论文复现或工程化方案验证。; 阅读建议:建议结合文中提供的完整仿真资源与参考文献,按照目录结构系统学习,重点关注控制策略的设计原理、模块实现细节与仿真结果对比分析,动手实践仿真模型以深入理解各子系统间的耦合关系及整体性能表现。
内容概要:本文针对高渗透率电动汽车随机充电行为对配电网承载能力的影响开展系统性研究,深入分析了大规模电动汽车无序接入导致的配电网脆弱性问题,构建了涵盖电动汽车充电负荷、分布式电源及电网运行约束的综合仿真模型,并基于Matlab平台进行多场景仿真。研究采用多维度指标体系评估不同渗透率下配电网的安全性、电能质量和运行效率,结合熵权法与模糊综合评价方法实现承载能力的量化评分,进一步提出广义需求响应协同优化策略,通过引导用户充电行为以缓解负荷压力、改善系统性能,提升配电网韧性与适应性。研究成果为高比例电动汽车接入背景下的电网规划、运行调控及基础设施建设提供了理论支撑与决策依据。; 适合人群:具备电力系统、电气工程或相关领域专业知识,熟悉Matlab仿真环境,从事新能源并网、智能配电网优化、电动汽车与电网互动(V2G)、需求响应等领域研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①评估高比例电动汽车接入对配电网电压偏差、线路负载率、变压器容量等关键设备运行状态的影响;②设计并验证广义需求响应策略在平抑负荷波动、降低网损、提升电能质量与系统承载能力方面的有效性;③为新型电力系统中充电设施规划、有序充电管理及电网升级改造提供科学依据和技术支持。; 阅读建议:建议结合文中提供的Matlab代码进行仿真实践,重点关注电动汽车充电模型的随机性建模、多指标评价体系的构建逻辑以及需求响应优化机制的实现过程,可进一步拓展至V2G双向互动、可再生能源协同调度等应用场景进行深化研究。
内容概要:本文围绕有源中点箝位(ANPC)三电平并网逆变器,提出一套融合双极性倍频脉宽调制(DPWMA)、正负序分离锁相及电网电压前馈控制的复合控制策略,旨在解决传统逆变器在谐波抑制、电网不平衡适应性及动态响应方面的不足。文章首先深入分析ANPC三电平拓扑在开关损耗均衡、中点电位稳定和低谐波输出等方面的硬件优势,继而系统阐述DPWMA调制如何通过等效倍频效应提升开关频率以优化波形质量,正负序分离锁相如何在电网不平衡工况下实现精准同步,以及电网电压前馈控制如何通过扰动预补偿机制提升系统的动态抗扰能力。通过构建“精准同步-扰动补偿-优质调制”的三层协同控制架构,并在Simulink中搭建完整的仿真模型,全面验证了该策略在稳态运行、电网电压不平衡及动态扰动等多种复杂工况下的卓越性能。结果表明,该复合策略能显著降低系统谐波含量,确保并网电流高度对称,提升动态响应速度,有效兼顾了逆变器的稳态电能质量、工况适应性与运行稳定性,具备突出的工程应用价值与广阔的推广前景。; 适合人群:具备电力电子、自动控制或电气工程相关背景,从事新能源并网、逆变器控制、电能质量研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①研究高性能三电平并网逆变器的控制策略设计;②解决电网电压不平衡、动态扰动下的并网稳定性问题;③提升大功率逆变系统的电能质量和动态响应能力。; 阅读建议:建议结合Simulink仿真模型,深入理解DPWMA调制、正负序分离与前馈控制的实现细节,并通过改变工况参数对比传统控制策略,以充分掌握该复合控制方法的优势与适用边界。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值