Welcome to the second meeting in 2018 of the Scottish Commission for Public Audit. I remind everybody to switch electronic devices off. As always, I ask members to keep the questions and answers concise and to the point. Agenda 1 is a decision on taking business in private. That asks the agreement of members to take agenda items 4 and 5 in private. Are members agreed? Agree. I move on to agenda item 2, which is consideration of Audit Scotland's spring budget revision 2018-19. Members have a copy of the spring budget revision in their meeting papers. I will welcome Ian Leitch, chair of the board of Audit Scotland, and Ian is accompanied by Caroline Gardner, Auditor General, Dan McGiffin, chief operating officer of the Institute of Dennis, corporate finance manager of Audit Scotland. I will invite Ian Leitch and the Auditor General to make any short introduction remarks. No introduction from you, Ian. No, not in this subject, chair. You know my views and this is rather mysterious. In that case, Auditor General. Thank you, convener. As in previous years, the spring budget revision requests budget cover for the non-cash pension charge that will arise as a result of accounting adjustments in 2018-19. As you know, these adjustments are notional and they don't generate cash movements. We aren't able to plan for them in advance due to the timing of the information we receive from our actuaries and the Scottish Government has advised us to deal with them through the spring budget revision process. The amount involved this year is £2.918 pounds. We'll do our best to answer any questions that the commission may have. Thank you. The obvious question is what preliminary discussions have you had with the Scottish Government to confirm that the previously agreed arrangements with the gym treasury remain in place in respect to the pension adjustment, and have you advised them of the amount of Audit Scotland's requirement? The answer to both questions is yes, chair. We've had the usual discussions with them. They're aware of the amount involved and they support the submission that we're making to the commission today. Can I open up to any other members who might have questions or comments to make? Dan? In that case, I've only got one small additional question to ask in the paper on page 4, paragraph 19, the expectation of continuing low interest rates in the next few years may require similar large accounting charge adjustments in 2019-20 and beyond. It's a little bit alarming, but it has been the pattern for the past few years. Is there any logical you would think—I know very little about these things—that once you've plugged a gap, it doesn't keep reappearing? You've gone to the heart of why this is a complex matter, chair. The accounting adjustments that we have to make aren't about covering a deficit in a pension fund. They're to do with the accounting adjustments that are needed to cover the accounting entries that relate to the pension scheme. Stuart can talk you through the accounting entries if you'd like to know more about it, but this isn't a funded scheme where we're looking to plug the deficit. That's handled separately in the contributions we make. This is the accounting entries that are required to reflect the movements around the pension scheme as a whole, and I'll hand over to Stuart to explain it to you. Yeah, there's really three elements each year around the figure. It's the projected current service cost, so that's the cost in year of the staff that you have for the benefits that they get by the end of March each year. On top of that, we will then have the interest income on plan assets and the interest cost on defined benefits. There's multiple things that influence this, and that's offset by the contributions that we make as an employer as part of the different valuation that Caroline mentioned in eventually plugging the gap in a future date. This is really the in-year cost that we have on that. Thank you. No one has any other questions. In that case, thank you very much. I guess we move to next agenda item, which is evidence on Audit Scotland's budget proposal for 2019-20. Again, members have a copy of the budget proposal in their meeting papers. It's the same witnesses for this agenda item, so without further ado, I don't know what you and I—perhaps this time you've got an introduction or mark to make followed by the Auditor General. Yes. We'll be happy to answer any questions on the budget that members may have, and thank you for the invitation, chair and members. A very brief statement. All members will be aware that we are in uncertain times at the moment on reflection that it's pretty much an understatement of what's going on in the world. Like the public bodies that we audit, we ourselves are having to navigate a course through this to run our business and to manage risks and uncertainty. We are tempted to do this while recognising limited public resources and keeping audit fees at a reasonable level. At the same time, we are mindful of maintaining and improving the quality of audit, just as further new financial powers and bodies are coming into being in Scotland. As such, we have produced our budget proposal, taking those factors into consideration in as much as we can. Our resource requirement is £7.564 million, an increase of £416,000 from 2018-19. That is 4.2 per cent in real terms and relates largely to people costs. That is in line with the long-term planned investment in the organisation that has set out in previous years to your commission chair. The 2019-20 aspects of that plan are detailed in the proposal. With your permission, convener, after that brief introduction, I will hand you over to Caroline Gardner in her capacity as a countable officer. Thank you, Ian. New financial powers continue to be rolled out to the Scottish Parliament. As the commission knows, those include major new responsibilities such as the transfer of social security powers. Our budget proposal will enable us to continue our statutory audit responsibilities, take on the audit of these significant new expenditure and revenue-raising responsibilities, and support the Scottish Parliament in its important role of holding government to account. As we indicated last year, we have developed a four-year plan that reflects the implementation of the new financial powers, and this proposal represents the second year of that plan. Finally, convener, as the chair of the board has said, we are all working in an environment of great uncertainty at the moment. We have reflected that in our proposal as well as we can at this stage, but we will keep a close eye on events as they unfold and keep in touch with the commission during that process. As ever, we are happy to answer the commission's questions. Thank you. Perhaps I can just ask the first question then. On the table in page 7 and further explained in page 8, Audit Scotland has advised that following the approval of the 2018-19 budget in December 2017, a further £262,000 of cost pressure were identified. Can you provide a bit more information on the sources of that additional cost pressure? Why have the additional cost pressures been met solely by additional charges to audited bodies? I will ask Stewart to pick that up in detail, but the biggest movement involved in there is the increased audit fees for integration joint boards, which were new bodies established in 2016 or 2017, and where they are gradually taking on significant new responsibilities for health and social care. As you are aware, the budget that we prepare is done every July-August time, and we submitted the budget proposal last year prior to the Scottish Government budget being announced. We were basing the pay award policy on the ongoing 1% cost of living. In addition, as Caroline said, we also had an element of, before that time as well, the fees that we cannot analyse until the audits have completed. The 16-17 fees were not completed by the time that we were building our budget, so what then happened is that once that is done and the SCPA approved our budget submission last year, we have revisited and there has been adjustments in respect of the pay policy primarily, and also the base fee increase for the volume that is increased in the integrated joint boards. I will throw it open then to the members. Alison, I think that you want to say something there. Moving on to explore the additional work requirements and the impact that will have, you have highlighted that in 2019-20, because of increased financial and performance audit work on Social Security Scotland and further work with the national audit office in respect of Scotland's VAT share and Scotland's rate of income tax, you are proposing a further £4.5 whole-time equivalence at a cost of £285,000 to deliver that additional workload. I would like to understand that, when you presented your 2018-19 budget in December 2017, you were suggesting that one whole-time equivalent would be required for that year, 2019-20, so I presume that additional information or a greater understanding of what is going to be required has meant that that is increased by £3.5. It is a timing difference rather than an increase. You may recall that our four-year plan suggested that at the end of that period we will have an additional 20 people in place to cover the full range of the new responsibilities of the Scottish Parliament and the Scottish Government. The exact timetable for the roll-out of the new financial powers is not fixed and keeps changing. For example, on Social Security, the Scottish Government has now entered into an agreement with the Department for Work and Pension to take on responsibility for some of the benefits sooner, and that means that the audit work needs to ramp up more quickly. I am just about to appoint in order to the new social security agency to cover that. The timetable for the full devolution of the assignment of the VAT revenues is also, we think about, to be agreed. There are some other changes behind that and I can ask Stuart to talk you through in a bit more detail, but it is timing differences within the overall plan rather than changes to the plan that we are looking at. Can I ask how you estimate the time that will be required to complete financial and performance audit work for an entirely new body? There is an element of judgment involved, as you would expect. We use our own audit experience of bodies of a similar size and look at the particular functions and responsibilities of this body to see what we think is likely to be needed. My team have worked very closely with colleagues in the National Audit Office who have got a good deal of experience of auditing the Department for Work and Pensions to get a better understanding of the systems that will need to be audited and the risks that will need to be taken account of. We are taking a phased approach to implementation so we currently have a small team responsible for all of our work on social security, the audit of the agency and the performance audit work, and we will build that up both as the timetable for taking on the new responsibilities is firmed up and as we build up our own expertise and experience around it. We are clear that 4.5 is the right number for 2019-20 and there are then two years of the plan after that that we can flex as the timetable unfolds. Given that Audit Scotland will work with the National Audit Office in relation to some audit work, how do you avoid duplication of audit effort and how can you demonstrate value for money in these circumstances? It's a really good question, one that we are spending a lot of time working on with our colleagues in the National Audit Office now. I think the first thing to say is that the devolution of these responsibilities to the Scottish Parliament doesn't reduce the size of the National Audit Office's audit of the DWP because of its scale and complexity. We have a memorandum of understanding in place between myself and the Comptroller in order to general at a UK level which sets out what work we will do to satisfy the needs of each of our Parliaments of the UK Parliament and the Scottish Parliament and the legislation includes some requirements for the CNAG to report to this Parliament. The expectation is that I will provide additional assurance letting this Parliament know that its interests are being taken account of during that process and that I've got no concerns about the work being done. We are due to have an update of the Audit Accountability Framework between the two Governments which will set out how this works once all of the new responsibilities have been devolved. That's still subject to discussion between the two Governments, but it's an important area to make sure that both Parliaments are getting the assurance that they require as well as making sure that there is no overlap in terms of the responsibilities that each of us carry. In terms of that duplication and an overlap question, to what extent has Audit Scotland considered or discussed transferring resource between audit agencies where responsibility for audit work changes, for example, from the National Audit Office to Audit Scotland, such as Social Security? We have considered the question with colleagues in the National Audit Office and I think it's fair to say there very strongly of the view that the devolution of the new financial powers to Scotland doesn't reduce their audit requirement at all. The amount of money involved is very significant for Scotland at about £3 billion a year, but it's actually very small in the context of the overall DWP budget and if anything there's more complexity while DWP is continuing to minister some of the benefits on behalf of the Scottish Government, so we'll keep that under consideration, but at the moment it looks as though the overall volume of audit that's required will increase as a result of the devolution of the new powers. On this point, on Social Security Auditor General, I may be straying slightly into the Audit Committee's jurisdiction here, but on Social Security, will the audit include an assessment of the set-up costs of the social security system in Scotland? Yes, it will. The financial framework was clear about who would bear the set-up costs for all of the new financial powers, including social security and the contribution that the UK Government would make towards that. I look at that as part of my performance audit work at the moment and reported on it, I think, back in April this year on an interim basis due to update that next year, and it's something that the Comptroller and Auditor General will be looking at through the lens of the DWP at the same time, so that information will be available to Parliament. On page 9, you set out your work programme for 2019-20, and it's based on the five-year rolling programme of national performance audits. Can I ask what role the availability of resources plays in deciding the priorities for this programme, based on the chair's remarks about uncertain times and financial unpredictability? Is that becoming a difficult task for you? The process is managed by Audit Scotland on behalf of me and the Auditor General. What we aim to do is to have a rolling five-year programme with certainty over the next two years and an indicative programme for years ahead, so that we can make the best use of our staff time and of the general intelligence gathering we're doing to inform the programme, and so that the people we're auditing and Parliament have got a sense of what's coming. You feel it's fairly set, fairly secure, and beyond that, it's just based on events. Is that the idea? It's certainly more strongly committed in the first couple of years, because by this point work that we're publishing next summer will already be well underway, so we know that's happening, but we do aim to keep some flexibility in there so that we can respond to events. The obvious example right now is the impact of EU withdrawal and what happens over the next 12 months, but other things do emerge from time to time. Last one next question, actually, was how do you build in, you know, is there a safety net for events that happen? There's enough there that could cope with anything that would crop up unexpectedly? We manage it within the programme on the basis that it's not appropriate for us to have a large chunk of uncommitted resource. It's money that's coming from other parts of the public sector, so we don't do that, and we can't carry reserves forward, as you know, but within the programme we're very clear how we can flex it to respond to events. That's possible to a limited extent over the next 12 to 18 months, but to a much greater extent for the remaining three years. If you need to move one area. Exactly, right, and for example we have got a category now around EU withdrawal specifically, where we've committed some resources to that as an area, without yet finding down the scope of what that will actually look at. There's too much uncertainty to do that yet. Okay, thank you. Thank you. Thank you. Thank you, chair. Auditor General, your budget proposes to increase management contingency, actually double it from 150 to 300,000. Why is that? It's a direct response to the uncertainty that we're facing now, because we aren't able to carry reserves forward, and obviously I'm not prepared to risk overspending our budget. We have for a long period run a small contingency of £150,000, which has been in the proposal we've brought to the Commission in previous years. Given the extent of uncertainty that we're now facing, not just in terms of the work that we may need to carry out, as Ms Mackay was exploring, but also what the impact may be on our costs in future, given the range of uncertainty that's around, we are proposing increasing that to 300,000. It's still a very small part of our budget. I think it accounts for 1.2% of our expenditure at the increased level, so it's a very small figure, but we think it's an appropriate buffer to have in place to avoid having to come back to the Commission if things turn out to have a big impact on our prices and costs next year. I see Ian Leach nodding. You obviously feel that this is quite important given the current circumstances. Yes, preparedness is a big issue, but I'm prepared for what. There's guidance issued to the auditors who audit all the bodies about the questions that they should be asking and see what the state of preparedness is, but if the organisation is different, it breaks it. What does it mean? I've given the example before of the European Agricultural Fund audit. It's paid for through Europe, through the National Audit Office, to us at the tune of £874,000 a year. Presumably there'll still be an audit, presumably there'll still be grants to farmers that'll need to be audited, but what will the shape of that be?  If it's a UK thing and we do it as a sort of agent of the NAO, then the resource should come from the NAO. If, on the other hand, it was to be devolved to the Scottish Government, arguably it would not be a chargable item to the Scottish Government because we can't charge for that audit, as you know. Therefore, it would have to be met from the Commission approving it as a top slice from the consolidated fund. We don't know all of these things. We don't know the flexing we've got. We don't know how the staff will be, because there's 18 staff members involved in that work. The contingency fund and our staff movement, for example, are 6 per cent turnover of staff, although there's some flexibility. One thing that we try to do is to avoid taking too much from the pot of the consolidated fund, because if we top-slice too much, it's a denial to other parts of the public sector the use of those resources. There's no point at the end of the day having that as a credit balance, because somebody didn't have the opportunity to spend that and worthwhile public projects. All of the factors that are leading on from the answer given by the auditor general there is how we're trying to manage our budget with unreasonable limits but give us a degree of flexibility. That makes sense. Can I ask of the 150,000 available in management contingency last year, or this year, how much of it has been used? I think that Stuart will be able to give you an answer to that. Last year we actually used half of it, so it was around 75,000 in our actual accounts. This year there are elements to be, but decided on that bit, whether it will be used in full is probably not similar to this year, but we don't know what's going to happen in the next three months, so it might well be used in full. Let's hope that next year we're living in more certain times and don't have these. Sorry, Diane. Just to add that obviously we account for what we've spent out of the management contingency to both the board and to yourself at the final accounts stage, so you have that additional assurance. If the unexpected changes don't occur, we will be accounting for why we haven't spent the management contingency, but we will be accounting for what we've spent as well, so you have that assurance at the other end of the process to us, to the board. I want to move on to the cost of audits, because we've picked up that the cost of audit to local authorities has increased by 4.2 per cent, but I think that the cost of audits to other bodies such as NHS and colleges remain broadly the same. Can you explain, Auditor General, why that is? I'll ask a Stuart to talk you through the detail in a moment. It's worth reminding the commission first that the board has encouraged us over the last few years to provide more transparency about the costs of each sector and how the costs are recovered through fees, and also to make sure that we balance each sector as well as the organisation as a whole, taking one year with another. So, there's more transparency about that. Stuart can talk you through the reason for the changes within the local government sector compared to the others. We do a sector analysis, as the Auditor General said. We looked at, we have to break even by a sector, is what we look for. Included in that is a portion of overheads, and it's based on the data of completion of audits from the prior year. What's happened is that when we collect that data and redistribute it, it means that it's moved around in volumes to where the work has been done, and that's where the fees and the apportionment of costs go and that balances that off. I don't follow that very well. I understand perhaps in accounting terms, but that doesn't explain to me how—can you take us through that again? Yes, sure. What we do is we have, broadly, we look to break even by sector. What we do is we take the amount of audit days for each sector, and then that is the key driver to how we then distribute the costs in our budget across the sectors, and then that allocates all the different overheads, so like finance, HR, IT, depends on where the work is. If that moves around, if the volume moves around slightly, what will happen is that more shift of overheads moves around as well? If the volume moves around? If the volume moves around, so that's the audit days effectively. If there are more audit days for councils than there are for colleges, for example, it becomes more expensive. I suppose my question is why are there more audit days for local authorities than there are for the other bodies? I think for a start when we mentioned would have been the integrated joint board, so they are a local government sector. As we highlighted, that's an area where we've had to increase based on the volume or audit days that we needed to do, so that would be one of the key areas. Can I just add to that? I think what you're referring to, Ms Marra, is the income from charges to local government bodies on page 14, which has gone up, as you say, by 4 per cent as a result of the volume changes that Stuart talked about. It might help to refer you to the fees and funding strategy on page 23 of the submission table 1, where you can see that the charges to local government bodies have gone up by 0.5 per cent in real terms, so that's the unit cost that has gone up by 0.5 per cent. The volume overall has gone up by 4 per cent because of the change in the volume of work that's done. Okay, so the cost of doing an audit of a council has gone up by, what did you just see? That's not quite the right conclusion either. The fee has gone up by 0.5 per cent in real terms on a like for like basis. That will vary for individual bodies depending on their circumstances, but across the sector that's the case. The overall cost to local government has gone up by about 4 per cent because of the change in the volume of the number of bodies that we're focusing on and the size of the IJB audits as they've taken on their full responsibility, and that's where the 4 per cent comes in. I apologise that this is complex. We do— Sorry, I apologise. I should be following it better, but is the differential between what you're charging them and the cost, who's picking that up? Local government pays for all of the audit work in local government, so all of the annual audits, the performance audit and the best value audits are paid for by local government itself through the fees. Okay, thank you. Rona. Yes, thank you. Now, following on from that line of questioning on page 24, you set out the early rates used to cost audits, and that includes staff costs. It's notable that increases for certain grades of staff are higher than others. For example, the early rate for audit managers has increased by 8.6 per cent from £70 an hour to £76 an hour, whereas the early rate for trainees has fallen by 8.3 from £48 an hour to £44 an hour. I wonder if you could expand on that and explain why. I'll ask Stuart to talk you through that. The trainees, as an example, the hourly rates are worked out based on the direct cost, so that's the actual pay, national insurance and pension contributions. Then there is an overhead element in direct costs that's included in that, as it says above around the property costs, IT, finance. What's happened is this is based on the budget at a particular time, so we take what mix of staff there are at that time. For example, the trainees has gone down from £48 to £44, is based on the mix of trainees and where they are on the pay scale. When it was done in 2017-18, there would have been more at the higher pay scale element than when we did it for 2018-19. A trainee rate is on a scale? It's not just a flat rate for trainees, it's on a... It depends where they are in their training programme, so the numbers where they are. We have roughly about 34 trainees, so in 2017-18, there would have been more at the higher point than there was in 2018-19, and then what that drives that is a key driver on the allocation of the overhead, so if that is reducing, that will take less of the overhead element, which means audit manager will take more, because it's at a higher level, because it's based on a pro-rata of the level that they are. Is that how it's normally always done? Is this standard practice? I think as we do Benchmark as a finance forum with other audit agencies, and these are very similar levels to, for example, Wales. So comparable with other audit sectors. Okay, thank you. Bill, I think you wanted to come in with a supplementary there. Yes, thank you, if I may. Do you have a budget for the hours? Each audit manager will have a budget for their audit, which is expressed in terms of both the audit fee that's charged to the body and a standard make-up of the audit team. But as you will know, the actual make-up of an audit team will vary depending on the availability of resources and the requirements of a particular audit, and the breakdown of each grade will vary over time, depending on where people are on their pay scales. Do you have a summary then of all the teams to give a total hours budget for the organisation? The audit services team, which is the team responsible for doing the 70 per cent or so of the annual audits that they carry out, absolutely have that budget and manage it very closely for each of the audits that they manage within managing the organisational staffing budget as a whole, which includes audit services, performance audit, and best value, and the corporate services group? In terms of the previous question, I may be connected to this just to perhaps clarify. This isn't a table at paragraph 26 of the rates paid to trainees. It's reflecting the different mix we've got of trainees. There's not been that shift in the salaries of people, but rather what the total cost of the audit is at each grade. I just wanted to make that clear if it wasn't clear there. Effectively, is it not an increase or a decrease? Is that what you're saying? It's not—our trainees are all paid a set scale, and that hasn't changed. The mix of trainees we have at the point in time that this table is produced has changed from the point in time that it was last produced. The last time it was produced, more trainees were at the top end of the grade. Those people have now qualified and have gone on to other roles in the organisation, and this is reflecting that there are more people starting their trainee journey with us, but they're all being paid the same rate that's not shifted. I hope that that's helpful. I just thought there might have been a bit of doubt about what the table was showing, coming back to your point. Yes, we have all of that data for the audit services group who manage the chargeable rates in the early allocations, and that's built up, as you would expect. I'll be then showing the time to say the spent of clients, time on training, time on— Yes, we have all of those profiles, and we work through the time recording system, and that's what helps to build up the picture of what the cost should be. Stuart mentioned earlier the shift that we made in the integrated joint board charging, which was driven from the use of the time recording data that looked at from the planning assumptions made about integrated joint boards to the reality of how auditors actually spent their time. We recognised that we needed to shift there. Do you see that somewhere? You can. Perhaps we could have a discussion afterwards about what form that might look like. I would provide you with assurance that that information is fed into the financial reporting and so on, which the Audit Committee and the Board review on a quarterly basis, and I'm very happy to share all of that. I have a question, and I'm pleased to see that quality has mentioned quite a lot in your budget proposal. You have your quality report, which, within it, has a regular survey of the staff and their views. The 2017 quality report identifies some areas that the performance has fallen compared to 2016-17, for example training and development. What are the reasons for the fall and the positive responses from those recorded in the previous year? Aside from the staff survey, how else does Audit Scotland assure itself that staff are well supported to deliver quality audits? Finally, you have 250,000 to invest in audit quality. How will you do this and how will it address the issues? If I missed the three parts of your question, I'm sure you will prompt me on the results of the survey. The first thing for your assurance is that the survey will be run again and you'll have the results again at the end of the year when we publish the next annual quality report. The survey hasn't been conducted yet, so I don't know the results for this year, but we'll be looking at them very closely. What we know last year is that, in some parts of the organisation, because of the volume of work, there were increased pressure, increased commitments—we've talked about the integrated joint boards, for example—and we have looked very closely at the training and development. We made some changes following this and we have changed how we organise professional support, which is providing the technical and auditing support and training that helps our auditors to be up to speed and up to date on all the technical matters that they deliver in their audits. We have had a real focus in our learning development programme this year to join up professional support and our learning development programme. We've offered more events, we've offered a huge range of different topics, we've had external providers and internal providers coming in. We've had work with the other audit agencies and a whole range of activities. At each of those events, we take feedback from colleagues who are taking part in learning and development and we're also taking stock of how teams feel about their ability to respond to the demands that they have. We're taking short-term feedback all the way through the year. We'll run this survey again and we have another survey that we run with staff, which is anonymous and we'll have the results of that soon. We know that the participation rate in our best company survey is very high. This year it's 84 per cent and it asks a series of questions about learning and development, so we'll await the results of that. We have the results of that going back 10 years and we can track very carefully what people feel. The participation rate for Audit Scotland in this particular survey that's reported in the audit quality report didn't achieve that 84-85 per cent response rate, which is exceptionally high and which is a high response rate that we're used to. We're also working on the timing of this survey and also thinking about how we can make sure that people participate. We're very disappointed with the results and we've been working very hard to improve them. People and their skills are the heart of the organisation and we want to make sure that our people have the time to devote to learning and development, are supported in learning and development and that we're working to make that as effective as possible. We've been doing lots of work in that area and we'll see what the survey results tell us. You asked about the audit quality team and what we were doing for that. We have a team of three people. If you've been reading our audit quality report, you'll see them pictured at the front of the document. They are regularly reviewing and reporting on audit quality to the Auditor General and to the Accounts Commission and to the Audit Committee of the Audit Scotland Board. They produce five reports in a 12-month period and including the annual report. In addition to the work that they do, they also commission work from ICAS, which means that we are independently, externally reviewing the work of all auditors, Audit Scotland and the firms that we appoint. This year, the work has just started. We will be reviewing, along with the quality work that teams will be doing individually. We'll have reviews of about 11 per cent of the audits that we carry out, which is a very significant percentage and increase on last year. In terms of the quality of the work, we're investing through, as Audit Scotland, through our learning and development strategy to improve the quality of the work. We have a comprehensive programme of quality reviews, and we report annually on that. We have independent external review of the work, which we publicly report on. In development, which is unique across the Audit agencies in the UK, we have taken that independent external review and extended it beyond the financial audits to include both the performance audits and our best value audits, where we're treading new ground in figuring out how to apply really good independent external review of two quite unique audit products. I think that this year we have a lot more quality review work on the goal than we did last year, and last year we made significant progress in the work that we reported. You'll see this annual quality report again at the end of the year, and you'll be able to compare another set of results on all of that. I'm a member of ICAS as well, but I'm just an ordinary member. It's one of our key issues as quality. As you know, the profession across the country is somewhat in dubious circumstances with recent happenings with some of the companies. We're particularly keen that the public audit model in Scotland is the best that can possibly be, and that's why we've gone to all this trouble and concern to make sure that we have this team to monitor it and have the independent review, and that's why the Audit Committee and the Board conscious to seek these reports throughout the year to ensure that there's an assurance, because we have to assure you, we have to assure ourselves first, we have to assure the clangarts and have to assure you and the Parliament that audit quality is good. Just as a final question then, have the reports or the reviews that you've done so far come up with anything that's concerning? Last year's report highlighted a thread across all audit providers, which I think is highlighted in all reviews of audit, which is the need for better documentation sometimes, so we've been working on that and as have our partners in the firms, but as of today there hasn't been any significant concerns. Can I ask if any members have any other questions that they'd like to ask at this point? I've got one or two if I may. Please. Just picking up from the submission, I've asked about the chargeable hours budget, which I think we'll get. Speaking about the social security, I don't think that you actually gave a cost or a number of hours to do the audit of a new body like that. That's the commission after today's meeting with that figure, if that would be useful. There's a capital budget of, I think, 150, down from 175. I think that you've got depreciation, maybe of 300 or something in the budget elsewhere. It's a rule of thumb. I always thought that your capital should at least be the depreciation just to make up for the consumption of the assets. Is that not the case? I think that it's changing because of the way our IT is provided now. Most of the capital budget this year is for IT costs, both hardware and software, but the balance of our overall spend on IT is shifting from buying equipment and buying licences to buying subscriptions for cloud storage for cloud services. We've moved to Office 365 for example this year, so there's less capital investment to run the IT service than we would have seen in the past. We are still depreciating past assets and our leases are dilapidated, depreciated on the same basis with provisions for dilapidations. The staff have the correct equipment to do the job. That's absolutely our intention and it's what this year's capital budget is intended to do. I know on other committees that we get reports from you on various things that go wrong at organisations. Do they get charged in some way for—if a good organisation does nothing wrong, is it in a better position than one that has a number of reports? Yes, for the chargeable audits that we carry out. Probably the clearest example of that has been the Scottish Police Authority over recent years where, for a range of reasons, we've had to do a lot of extra work to be able to provide an opinion on the financial statements and they have been charged an additional fee to carry that out. That's at the extreme end of the range of what's been needed, but that's the best example just now. Does that cost appear in those reports somewhere? It's included within the fee income that you see and it's often part of the answer that we give you when you ask why the fees for particular bodies have changed. I think that we wrote to you last year with more information about the fees that had been higher than predicted, the difference between the budget and the actual. It doesn't appear on the face of it because they are generally very small movements. Something of that scale is unusual. Okay. I've got a couple of small questions myself. I noticed that firms employed by Audit Scotland to perform audit functions received a 2 per cent increase in fees. Although it's not a comparison really, the average fee increases were 1.6. Can you confirm that of the chargeable bodies, the fees from them cover the increase in the fees for the external providers? In total, yes. The mechanism for increasing the fees to the firms is set out in the contract that we have with each of them following the procurement two and a half, three years ago, which makes the provision that we will uprate the amount that we pay to them in line with the base increase to our staffing costs, so 2 per cent is the assumption that we have in for both our base increase to staffing costs and for the fees. That has been recovered on the other side? Absolutely, yes. By sector, as well as across the budget as a whole. On page 5, paragraph 9, you're talking about new social security Scotland. You're talking about a new auditor for that. You're talking about a new team. Where is the expertise coming from for that? Is there special expertise needed? There is certainly special expertise needed. We have some expertise ourselves. We have been auditing housing benefits in local authorities for a number of years now, which provides us with a good starting point. Since the Smith commission agreement and the Scotland act was first being developed, we have recognised the need to build our capacity in this area, and we have worked very closely with our colleagues in the national audit office who have many years' experience of auditing the department for work and pensions and its predecessors. We have developed some specialist training for the staff who are involved, building on that to make sure that we have the experience that we need. You're absolutely right, though. It is quite a complex and specialised area, with particular risks, both in terms of the level of fraud that's been experienced in the UK as a whole in the past, but also the importance of getting it right for people who rely on benefit payments for their wellbeing. We absolutely recognise the importance of making sure that our teams are properly skilled to do that. Diane, do you want to add to that? We've been recruiting this year a lot, and I think that in the year to date we've had 19 news starts in the organisation. There's quite a lot of resourcing internally, where we're looking at the mix of experience and skills that we have and the career opportunities that people want. We've also been, as you know, we've got a very strong commitment to our graduate training scheme and a very strong commitment to growing our own expertise. We took on an additional two graduates last year above what we had notionally planned to help to make sure that flowing through into the new social security work there'll also be a range of skill mix, so there'll be graduates, there'll be experienced staff, there'll be new people, so that we can get that diversity in our teams that will really help us to make the most of the opportunity that we have to set up a new team and expand the organisation. There's a mix. It's a challenging environment in which to create new teams, but it's also a real opportunity for us because we've been expanding slightly as an organisation, and that's been a welcome growth with welcome career opportunities in it for existing colleagues and for new members who've joined. I get the impression that there's increasing specialisation within Audit Scotland, within particular areas. For example, we're talking now about the special skills needed for social security. We've talked previously about special skills needed for IT audits and so forth. Are we increasingly having to rely on people who are specialists in their own areas? Is that creating any sort of silo effect within Audit Scotland? I think that you're right that our work is becoming more complex and the range of bodies that we audit is increasing with things like social security and tax raising for the first time. We work quite hard to make sure that we've got the balance right between having as much flexibility as we can in our resourcing and giving people the sorts of career development opportunities that Diane was referring to, while also having the real specialism that we need for areas like social security that are quite particular. Our workforce plan is part of addressing that. It aims to make sure that we're thinking ahead about what skills we need so that we've got the chance to develop them internally and to recruit to them. The core that runs through all of it is audit skills. Ian referred earlier to the staff who are working on the audit of the European Agricultural Fund. We have about 20 staff working on that. If that work finishes because of the way in which we leave the EU, they are all qualified auditors who will be able to work on other parts of our portfolio of work rather than running the risk of them not being able to be redeployed elsewhere. That's an example of the sort of balance we try to maintain. It doesn't mean that it always works smoothly in the short term, but that's our intention for the longer term. On page 7, I was just noticing that you've got people costs going up, numbers of staff going up, but you've got your administrative costs going down. How realistic is that? The reductions in the other administrative costs are all identified reductions, a combination of savings and cost reductions. I think that Stuart can give you a bit more detail about what's included there. We think that it is realistic as the important point. I think that some of them will be in respect of property costs, which will be coming down. Obviously, there was mentioned earlier about depreciation. That cost is coming down, and also our travel and subsistence is coming down. That's a combination of the car scheme that we had for staff seizing on 1 April 2017, and a staff leave that were members of that. That reduces the cost there. Everything that's been identified to reduce is achievable. The real decrease in costs is greater, because those costs are supporting more staff. Yes, the costs are coming down, but even though there's more staff, some of them won't, for example, the car scheme won't get the benefits, so that's a genuine saving. Things like the business rates that we have, that cost has come down. All the savings that we've identified are actually ones that are deliverable, even though the staff numbers are increasing. One last question. On appendix 2, page 19, performance and best value, audit. For some reason, I'd never realised before that local authorities only pay half of that. Performance and best value audit convener are on page 19, are you looking? Page 19, appendix 2. The total cost is £3.9 million broadly, of which local authorities pay £2 million, and the Parliament pays £1.8 million. Local government is paying for all of the performance audit work in best value and all of the best value audit work in local government. The SCPA, the consolidated fund, picks up the cost of all of the performance audit work that's done in the NHS central government and the further education sector on the back of the fees and funding strategy that we agreed with you at the beginning of this process. Okay, thank you. Do any members have any other questions that I want to ask? In that case, thank you very much for attending today, and we now move into private session.


A military map is simple and easy to understand once you know how to apply certain basic principles. This man, for example, is in unfamiliar territory. He wishes to identify his present location and plan a route which will take him back to his platoon in a small town some distance away. On his military map, if he knows how to read and use it, the soldier will find all of the information necessary to solve his problem. But before he can be certain that the information he reads from the map is correct, as it relates to his present position, he must orient the map. To orient means to adjust. Thus to orient a map, you place it in a horizontal or flat position and then adjust or turn it until north, which is always at the top of the military map, is pointed toward north on the ground. When this is done, the symbols on the map will occupy the same relative positions that the features they represent occupy on the ground. In this way, you can locate and identify any visible features the map depicts, as well as determine the directions to features which lie beyond your range of vision. There are several ways to orient a map, but one of the fastest and most accurate is with a compass. This is a lensatic compass, commonly issued for use in the field. It takes its name from the magnifying lens, which is mounted in this arm. The most important features of this compass are first, a siding device consisting of this siding slot and this siding wire, and second, a free-floating dial indicator. Although you can see that the dial has lines and numbers in both black and red, we will be concerned only with the red markings around the inner edge of the dial. These red figures indicate degrees, the most commonly used unit of angular measurement in map reading. A circle is divided into 360 degrees. If you stand in its center, these directions, as indicated by the degree marks, radiate out from you like the spokes of a wheel. The compass dial, due to lack of space, is marked in 5-degree graduations and every 20th degree is numbered. The magnetic arrow on the floating dial always points to magnetic north, so each degree mark around the dial indicates a specific direction away from magnetic north. Thus, by looking out from the center of the circle or siding across the center and over a degree mark, you can identify a direction. By holding the compass to your eye in this manner and lining up the siding slot, the siding wire and your target, you can read the direction of your target. This direction, when referred to magnetic north, is known as the magnetic azimuth. Other features of this compass for use in daylight operation are first, this index line over the compass dial permanently aligned with the siding slot and wire. This straight edge parallel to the line of sight. And this bezel ring, which with a crystal it contains, can be rotated. When turned, the bezel produces clicks, and each click represents 3 degrees, a valuable feature for night operations. The first step in orienting a map with a compass consists of studying the map's declination diagram, which is found in the marginal information at the bottom of the map sheet. A declination diagram is placed on most maps to enable the user to convert a direction based on one north line, for example true north, to a direction based upon another such as magnetic north. This becomes less complicated once you recognize that three separate and distinct designations of north are encountered in using a military map. The first of these is called true north. A line from any position on the earth's surface to the north pole indicates true north. On a declination diagram, true north is symbolized by a star. However, when you use a compass, its arrow rarely points to true north because this arrow is attracted to, or points to, a magnetic area of the earth, which is located some distance from the north pole. Magnetic north is indicated in the declination diagram by a line topped with half an arrowhead. Magnetic north is the reference used when working in the field with a compass. We can see then that true north and magnetic north are two of the three norths we must consider. The third designation of north on the military map is grid north. This is used when working on the map itself. As you know, the military map is printed with a grid, which is used for locating points on the map. For technical reasons, few of the grid lines which run from the bottom to the top of each map actually point to true north. Since grid lines are essential to use of a military map, their actual direction must be indicated for the user. Thus, the declination diagram includes a line which shows grid north. This line is symbolized by the letters G-N. These then are the three norths encountered in map reading. True north, magnetic north, and grid north. To be of value to the map user, their relationship to each other must be known. This is what declination means. The angular difference between true, magnetic, and grid north. In the declination diagram, the amount of this difference is indicated. It must be emphasized, however, the declination diagrams will vary with each map and may look more like this, or this, or this. When using a map with a compass, always begin by studying the declination diagram and analyzing the information it contains. Then apply this information to your individual situation. For example, in plotting a line on a military map, you will use grid azimuth, which is based on grid north. But a compass reading gives you magnetic azimuth. So before you can apply a compass reading to your map, you must convert from magnetic to grid azimuth. The declination diagram is used for this conversion since it shows the angular difference between grid and magnetic north, which is called the GM angle. The GM angle states the amount of declination and the direction from grid to magnetic north. In this case, magnetic north is a total of 15 degrees east of grid north. The GM angle will vary with each map. Here it is 5 degrees west, meaning that magnetic north is 5 degrees west of grid north. And here the GM angle equals 4 degrees west. Remember, the GM angle indicates only the declination or angular difference between grid and magnetic north. Now that we recognize the GM angle as expressing the relationship between grid and magnetic north, let us see how this information is used in the field. This man, as you remember, is about to orient his map using his compass. He has been studying the declination diagram and has determined the GM angle at this location. He now places the straight edge of his compass along any north-south grid line on the map and then rechecks the declination diagram for the GM angle. It is 5 degrees west, meaning that magnetic north is 5 degrees west of grid north. The soldier now carefully rotates the map, keeping the straight edge of his compass aligned with the grid line until the difference in direction between the arrow of the compass and the black index line is equal to the difference in direction as shown in the declination diagram. In other words, when the map and compass have been rotated to a position where the arrow of the compass indicating magnetic north is 5 degrees west of the black index line, which indicates grid north, the map will be oriented. This is how the GM angle is used in orienting a map with a compass and it is equally important in measuring directions once the map has been oriented. A direction is a straight line along which anything may be aimed, pointed or moved. Direction is expressed in terms of angular measure, usually degrees. In map reading, the baseline used is always north. But which north is used? In the field working with a compass, the baseline used is magnetic north. When working on the map with a military grid, grid north is used. In the field using a map and compass, we must deal with two baselines in measuring direction, the magnetic and the grid. This is where the GM angle is important for it is used to compute grid north for magnetic north or vice versa. To demonstrate how this works, let us assume that we wish to determine the direction of a point which lies out here. Direction, remember, is a straight line. So we draw in a direction line between our compass and the point with which we are concerned. In the army, direction is expressed as azimuth, which is defined as a horizontal angle measured clockwise from a baseline. Azimuths are named for the baselines from which they have been measured. True azimuths from true north, magnetic azimuths from magnetic north, and grid azimuths from grid north. Since true north is not used as a baseline in determining direction with a map and compass, we will ignore that. In the field, magnetic azimuth is determined by sighting with your compass on an object whose direction you seek to establish. In this case, such sighting results in a compass reading of 80. This is the magnetic azimuth of our object. In converting this magnetic azimuth for use on our map, it is easy to see that grid azimuth is greater than magnetic azimuth by exactly the width of the GM angle, 15 degrees. Thus, to find grid azimuth for map use, add the GM angle of 15 degrees to the magnetic azimuth of 80 degrees, and you obtain 95 degrees as the grid azimuth. When magnetic azimuth is less than grid azimuth, add the GM angle. Elsewhere on earth, the magnetic azimuth may be greater than the grid azimuth. So the GM angle of 15 degrees, as shown on the declination diagram, is subtracted from the magnetic azimuth. This gives us a grid azimuth of 80 degrees. To go from map to compass operation, you convert grid azimuth to magnetic azimuth in the same way. Here, grid azimuth is 95 degrees. Since magnetic azimuth is obviously less than grid azimuth, you will subtract the GM angle of 15 degrees from the grid azimuth of 95. Thus, the magnetic azimuth is 80 degrees. This, then, is how you convert grid azimuth to magnetic azimuth and vice versa. Study and practice with declination diagrams will enable you to use the GM angle for this purpose easily and rapidly in the field. Now that we have seen some of the principles involved in using a military map with a compass, let us see how they are applied in field situations. In the field, particularly under combat conditions, it frequently is necessary to determine a location which is not specifically identified on the map. This man, for example, sees this armored personnel carrier and wishes to report its location to his superiors. Although the APC is not in a position which is identified on his map, the soldier can determine its location by applying the principles we have just seen demonstrated and performing what is known as intersection. Intersection is used to locate points which are not designated on the map and is accomplished with a compass by sighting on the unknown point from two locations which can be identified. To illustrate, suppose that the APC we just saw was located approximately here. We first observed it from this road junction. To identify the point where it is situated by means of intersection, first we note our location at the road junction on our map. Then we sight our compass on the unknown position and record the magnetic azimuth of 145 degrees. Next, we move to a second known position from which we can see the APC, a position about 90 degrees from the first. We will use this road junction. Again, we note our position on the map and sight on the unknown point. This time, the magnetic azimuth is 205 degrees. We record this figure on the map and our next step is to convert magnetic to grid azimuth. So we refer to the declination diagram for the GM angle. In this case, the total variation between grid and magnetic north is 5 degrees west. This is our GM angle. By studying the diagram and remembering that azimuths are always measured clockwise, we can see that magnetic azimuth is greater than grid azimuth. This means that we must subtract the GM angle of 5 degrees from our magnetic readings to obtain grid azimuths. The grid azimuths will be used to plot the point at which the APC is located on our map. For this plotting, a protractor is used. Protractors come in several forms, but all of them divide a circle into units of angular measure, in this case, degrees. A scale of the degrees within a circle is printed around the outer edge. In the center of the protractor is an index mark. To plot the position of the unknown location on our map, we first place the protractor with its index mark directly over one of the points from which we sighted on the APC. Zero on the protractor must always face grid north, and the index lines must run exactly parallel to the grid lines on the map if plotting of the grid azimuth is to be accurate. When the protractor is precisely placed, we read the grid azimuth obtained at this location, 200 degrees, and mark this point on the map. Now with a straight edge, we draw a line from the observation point directly over the 200-degree mark toward the unknown position. We then read the grid azimuth obtained at the other point, 140 degrees, located on the protractor, and mark it on the map. Again using a straight edge, we draw a line from the observation position directly over 140 degrees toward the unknown location. The spot where the two drawn lines intersect is the location of the APC. On our map, it can now be read and reported as coordinates 387-113. This is how you can use intersection with a compass to obtain the reportable location of an otherwise unidentified position on your map. But what if you are in an unknown location and need to find your position? How can you do this? It can be done by means of what is called resection. It is performed by sighting on two features which appear on both the ground and the map. To illustrate, you are somewhere in this area and need to know your exact location. From your position, you can see this church and this farmhouse, both of which appear on your map. After you have oriented your map, you sight on the church from your position and get a magnetic reading of 320 degrees. You note this on your map beside the church. Then you sight on the farmhouse and obtain a reading of 40 degrees which you mark on your map beside the farmhouse symbol. Now you must convert these two magnetic azimuths to grid azimuths for use on your map, so you refer to the declination diagram. The GM angle is 5 degrees west. This, you can see, must be subtracted from your figures to convert them to grid azimuths. But even these grid azimuths do not enable you to determine your location on the map. For that, you must have back azimuths which are in effect the azimuths back toward you from the points on which you have sighted. Back azimuths are obtained by adding 180 degrees to any azimuth which is less than 180 degrees or when an azimuth is more than 180 degrees by subtracting 180 degrees from it. With the back azimuths thus obtained, you are ready to determine your position. To do this, position your protractor on the map over the feature you first sighted on, the church. Then on the protractor scale, locate and mark the back azimuth you have obtained for this location 135 degrees. With this completed, remove the protractor and with a straight edge, draw a line from the point on which you sighted the church back toward yourself, passing through the point marked at 135 degrees. Then repeat this process at your second reference point, the farmhouse. Be certain that the placement of your protractor is correct. Then on its scale locate and mark the back azimuth you have for this position. It is 215 degrees. Remove the protractor and with a straight edge, draw a line from the point on which you sighted through the dot indicating its back azimuth and on toward yourself where the two drawn lines cross will be your location on the map. In the field, resection to locate your position on the map is performed in the same way. We have seen how to use a compass to orient a map, determine directions and identify unknown locations. Now let us observe how it can be used to get you across country. This man is here in this barnyard at 104 673. He must get to Chickamaxon here to rejoin his platoon. For tactical reasons he must avoid this highway, which means that he will have to go across country to reach his destination. To use his map and compass to get him there, the soldier first places a straight edge on the map, connecting his present location with his destination and draws a line along it between these two points. Next he positions his protractor with its index point directly over his present location and its index lines properly parallel to the grid lines. He then reads the protractor scale at the point where it lies over the line he has drawn. In this case, 265 degrees and notes this figure down. But remember, this is grid azimuth and to use his compass to follow it, this figure must be converted to magnetic azimuth. The declination diagram tells the man that the GM angle is 5 degrees west and magnetic azimuth is greater than grid azimuth. So he knows that to obtain magnetic azimuth, he must add the value of the GM angle to his grid reading. This results in a magnetic azimuth of 270 degrees and the soldier is ready to set his compass for cross country use. He first rotates the compass until the line indicating 270 degrees lies directly beneath the black index line. Then he turns the bezel ring until the long luminous line on its crystal lies directly over the north-seeking arrow. Now his compass is set for the desired azimuth and he is ready to move. The soldier will hold his compass where he can read it conveniently, approximately halfway between his chin and his belt. In this position, it has been demonstrated that the compass will not be affected by any metallic equipment he may be wearing. With the compass in place, the soldier now slowly turns until the arrow is directly under the long luminous line on the bezel. Now the azimuth 270 degrees will lie directly under the black index line and in line with the compass sighting wire. By following the line thus established out over the front cover, the compass user can determine his azimuth. If a landmark which can be kept in constant view lies on his course, it may be used as a steering mark. But even when no such reference points are available, the soldier, once he has set his compass, can maintain a direct heading toward his destination by frequently referring to his compass, checking his course and reciting along the route. However, be careful when taking readings not to have metallic objects such as the helmet too close to the compass. At night, the compass may be used for simple land navigation in the same manner. For this purpose, it has certain luminous features not discussed so far. These are all visible in the dark and include the line on the bezel glass, the north-seeking arrow, letters indicating east and west, and an area directly under the black index line for reading azimuths. In addition, the compass cover contains two luminous dots, one at each end of the sighting wire. When the compass has been set with the azimuth directly under the black index line and the long luminous line directly over the arrow, it is ready for night use. Rotate the compass so that the arrow lies directly under the luminous line. Then sight along the line indicated by the two luminous dots at each end of the sighting wire, and this will indicate your azimuth. If it is light enough to make out steering points along your route, make use of them. If it is so dark that none can be seen, send another man out along the azimuth line as far as he may be seen. Then sight on him, move to his location, and repeat this procedure until you arrive at your destination. If neither of these ages available, continual reference to your properly set compass will accurately guide you to your goal. These then are the basic principles of using a map and compass in the field to determine locations or to guide you across country by day or night. Learn to apply them by study and practice, and you will be arming yourself with knowledge and experience, which may someday be the key to a successful mission.


Good morning! Today we are going to do some demonstration on the energy harvesting features of the SD25DV NFC dynamic tag. We use the SD25DV discovery with antenna C1 which is a good card size antenna. We also use antenna C5 slightly small antenna. We use the typical Galaxy S8 phone and also the SD25R3911B as a source of RF energy. Okay before we start to look into the how much energy is being harvested using the hardware. I want to remind you about the power transfer over RF. If the antenna is around this small, it is ideal that this is the tag antenna. It will be ideal that the read antenna is about the same size. This is ideal. So the read antenna can be either a NFC phone or a commercial reader and the tag antenna is of the SD25DV. Now if you have a fairly large reader antenna, right, and then you have a fairly small tag antenna, the energy transfer wouldn't be as great because the field strength is right around the conductor and it radiated outward and so on. So there will be field inside the interior of the antenna but it won't be as strong as it is if it's near the conductor of the reader antenna. So keep that in mind as we progress through our experimentation. So how do we get to the energy harvesting section of the SD25DV? When you first start it, plug in USB port, either port will work by the way.  Now you take your phone closer and go to you can read. Notice the amber light, the LED turns on. So use that as a guy as the phone is further away from the antenna. It will start flashing when it's not as well coupled but when it's really coupled it will stay lit pretty brightly. And you can move your phone around so that you can actually see difference in energy harvesting and where the energy is strong and weak and how much power you can harness from this configuration. Now we use a small antenna and you can compare the two so that you can see how much energy is harvesting using the small antenna versus the large antenna. Also I like to use the SD25R3911B development board, discovery board. Set for polling mode. I can start seeing the difference. As you can see even at the very far range, the longer range, the LEDs is lit quite brightly. You will see the maximum power and go pretty high versus the phone and using a smaller antenna. Okay so in conclusion use the SD25DV as an exit mean to measure our fuel power and use it to determine different antenna size and different reader can produce different results. Thank you.


It's such a fundamental question. Women make up more than half of the world's population and they shape family community business at every possible level and across every possible sector, whether they are recognized for their contributions or not. So if we are serious about co-creating or changing our journey for truly sustained societies and economies, you cannot even have that conversation unless you put gender inclusion and true parity at the center of that debate. And that operates at multiple levels. For us, it's a fundamental part of CISL's work, but when I look out at the world today, global south, global north, I'm reminded that the seeds of conflict today or tomorrow lie so closely in the way we think about our natural resources, our human resources and our approach to power. And women are part of shaping new paradigms to the kind of societies that we actually want, the kind of future we actually want. And I believe that they are a huge part of the solution because the world is looking for different approaches to leadership. And we already see examples around the world, south and north, where women in taking on senior political and corporate leadership have made massive impacts. And I believe that needs to be something that we mainstream and CSL stands right behind that as a central part of our mission and root to impact.


Hello. Uh, this session is packing the data and getting it back out. Can everybody see in here? Fine. Okay. Well, this, uh, talk is about, uh, programming techniques to save time and space. Um, basically, you, uh, can get disk very cheap now, but even if a terabyte disk is really cheap, it doesn't mean getting a terabyte off of the, a single spindle is going to be anywhere near fast. Disk access takes time. Large data, larger data sets can be handled with the same old, you know, I'm using older hardware and, uh, data can be organized for quick access for common queries. Before you really try and, uh, use these type of techniques, it's nice to know your data, know your access patterns, and you want to think about what's the common case and optimize for that. But really, you shouldn't be, uh, afraid to experiment. And I've gone through several iterations of, uh, my, the program I'm using as an example and, uh, improved the, uh, format. The example data set I'm using is, uh, the open street map, uh, data. It, uh, consists of a weekly planet file, which is, uh, six gigabytes B zipped and over 120 gigabytes of XML after you expand it.  And there were some problems, uh, originally, uh, applying all the, the change, minutely changes to, uh, the SQL database. Um, they eventually got worked out, but that was true at one point in time. The open street map data consists of change sets, which I'm going to ignore for the purpose of this talk because they really, their, their, how the data got to this current state rather than, uh, what the current state is and all I'm care about is what the current state is. Nodes, which are locations, well, okay, nodes, ways and relations. A node has a latitude, longitude version and an optional set of tags. I'll explain what tags are later. Ways have version, list of nodes and tags. Ways, nodes are used for either as parts of ways or, or relations or else just a point of interest like a shop or a stop light or even a tree. Ways are, uh, ordered lists of, of, uh, nodes and, uh, can, are used for things like streets or lakes where, uh, uh, they use a ordered list of nodes and, uh, because it's naturally equal water, they know it's an area. Relations have version members and tags and members can be nodes, ways or, or relations and each member also has a role. Um, what they're used, they're used for things like turn restrictions and other things. They, they get fairly complex and exactly what they're used for really doesn't apply to this talk. All, all of those pieces of data have tags which are a key and a value, both of which are free format UTF strings. So, you know, a way can have a highway equal steps to re, to indicate that it's a set of, uh, it's a staircase.  You can't have two highway keys on the same way. Some strings are common, others are rare. And one of the problems with, with using free form strings is you, you'll get typos into your database. There's a number of hig ways, uh, and so forth. But it allows for, for easy expansion and you can create your own new data. If nobody has a thing for a street light, you can do it a street light. Well, actually there is a street light thing right, already. But you can, uh, you know, if, if there's something you think should be on the map, you can add it to the map without having to go through a complicated approval process. Now if you want it to be used much, you do have to get people agreeing on what it is. And roles are a simple UTF 8 string. And most, mostly they're, they're actually empty strings, but, okay. Here's an example node. The node ID, you know, 108331, there's just a unique identifier. Uh, there, the, the, it's a unique identifier for node, but there can be a way with the same number. There can be a relation with the same number. Version is f, equals five, which means this, uh, particular node has been updated four times since it was originally created. Time stamp is the time stamp of the, the last time it was updated. The UID and user are, are who did the last update. And the change set is the change set that, that this, uh, update was part of. Um, all of those are actually being ignored in my example because they're, they don't really apply. Uh, it has a, the latitude is 51.496, whatever the longitude is minus 0.13. So it has a location, and it has a direction. Why a node will have a direction? I am, oh, it's a mini roundabout, a clockwise mini roundabout, uh, so it's probably in the UK where they use just a painted circle in the middle of a street intersection to say, treat this intersection as a roundabout. Okay. Here's an example way. This one's a particularly simple one because it only has two nodes and, you know, and one tag. But I, I chose simple ones because it fit on the slides better. And here's an example relation. And this winds up being a simple relation, but it was difficult to, to get it to fit on the slide. And this one happens to be a, a turn restriction. So it's indicating you can only make a right turn at this particular intersection. Okay. Um, now I'm going to talk about some, some pseudo data types that I wound up defining in order to pack this data in. Um, because the num, a lot of the numbers that I was using wound up, well, they can be fairly, fairly large, but still the numbers closer to zero are a lot more common. And so I decided to use a variable length encoding scheme where I'm using, uh, seven bits per byte on the, uh, to, for, for the actual number and one bit and one bit and one bit as a continuation bit. So for, in one byte I can store a number between zero and 127 or two to the seventh minus one. Two bytes I can store, store 128 through 16,300 and whatever. It winds up being slightly more than two to the 14th because as a two, two byte thing I'm not duplicating the possibilities that can be stored in a single byte. So I have an extra 128 possibilities than the two to the, it, it's a very minor optimization. And, you know, with two, with, uh, three bytes I can store up to slightly more than two to the 21st, et cetera. Um, this wound up, wound up working quite nicely. Um, and I stored it a little Indian because it wound up the program, it, it was much easier to program the access for these numbers little Indian than it was big Indian. And here's a little pearl routine I have for, for storing one of these, uh, venums. For, I mean, if you want to access this later, I did, uh, up as of about an hour ago I uploaded the slides on, on my talk. So you should be able to access them. And here's a routine to fetch the venum, which actually, uh, reads it from a file because I was always reading them from a file. The, the store I was actually doing to a string and then manipulating it further before I wrote it to the file. And another common data structure that I wound up doing was, you know, like, the, the tags, there are a lot of common tags and then there are some really uncommon ones. And, so storing it as a string wound, winds up with a lot of duplication, but storing it as an index to a table winds up. Well, gee, somebody else created something new and do I have to create a new table entry and so on and so forth. And so what I wound up doing was using a single value to indicate that the string follows. And so, I'm going to do, you know, the uncommon strings are indicated by a zero followed by the, uh, actual string followed by a null to terminate the string. And for the actual common strings, I'm using a venum to store the string. And so I sort the most common strings have the lower numbers. And so the most common 128 possibilities will be stored in one byte. The next most, you know, the next, uh, 16,000 in some odd will take two bytes to store and so on and so forth.  I'm using a hash for, for encoding the string and an array for decoding the string. I assume everybody knows how to, how to do those. I, to, to get the, uh, set of common strings, I run a program over the current set of the database and do, and create the, the common string table. And once, you know, once I do that, I, I'll use that for a while and then we'll run that again to get a new version to, to compress it further, you know, because the most common strings actually wind up changing over time. And I set, use a single venum in the beginning of each data file to, uh, store which version of, of the table. So I don't, so I don't have to update the database all at once. And I use separate tables of common strings for each key, each type in key. It's getting cut off at the bottom of the slide here. Okay, I actually store a node as a size, which is a venum ID, which is, uh, actually, I'm actually using a standard, uh, 32-bit number for that because there are more than 2 to the 20, 2 to the 28th, I believe it was that I, I just determined that on average the size would be bigger to use a venum because of the number of 5-byte things to store a full 32-bit. Then, uh, just using a 4-byte string, although in, you know, when, when the, uh, number of nodes in the, uh, open street map quadruples from what it is now, we'll have to think about, you know, going to venums because, uh, it'll be more than a 32-bit integer can handle. But before that, I'll have some problems with, uh, trying to, you know, long before that I'll have some problems, uh, with Perl and, and it doesn't seem to have any option for, uh, handling seek on a very large file. The latitude and longitude I'm storing is integers, 32-bit integers. What I'm actually storing is the latitude times 10,000 and the longitude times, I roll not 10,000, I think it's 100,000 or something like that. But anyway, it's, so I'm using almost all of the 32-bits, but storing it as an integer. Uh, if I, if I used a floating point number, I wouldn't have enough accuracy for latitudes and longitudes further from the equator. And the way the data work, you know, we don't need to more accuracy close to zero. It's just, zero is pretty arbitrary on latitude and longitude. The version, which was, you know, just the version number from the, from the, uh, data and a set of tags, which, you know, use a key followed by a value, both of which are the common string. And I indicate that the, the end of tags by, you know, using the size at the beginning, so I know, so I don't have to store any separate number of tags or so on and so forth. It winds up being a little bit complicated to, you know, if I want to figure, you know, I can't just index, index into the tags, but I generally don't need to do that. Ways are stored fairly similarly because there are not nearly as many ways as there are nodes. I'm using a Venom to store the IDs on ways. Um, the nodes, node list is stored by, as a number of nodes followed by the list of nodes. Actually, okay, I should have used unsigned on the node ID here to match what I did above, but I'm basically, you know, just still a 32 bit integer. And relations are a little bit more complicated. Uh, and there's the size ID version. And a list of members which, uh, the member type is, you know, 0 for, for the la, indicating that this is the last member. Uh, one for node, two for way, three for relation. I'm using a full byte to store two bits of information, but I'm not really trying to get the every last bit in out. Um, the member ID which is Venom for, uh, ways and relations or, or a 32 bit integer for nodes. And the role is a common string. And tags are handled like the others. Okay. On, on the desk, uh, I'm organizing the data by a tile, where the tile is a group of data in, in a, in an area of latitude and longitude. And we, we do the, on open street map we do projection for do, Mercad, Cotter projection for doing the maps. And so I'm using the projection, uh, subroutines we already had available or slightly modified versions thereof. Um, areas with more, uh, nodes are stored in more tiles. I'm not actually just using one size of tile for all of the world. In areas that are almost all C, there are very few, there's very little data of interest. And then in the central, uh, center of London there's a very, a lot of data. And so I, to, to equalize somewhat the, uh, size of the groups of data, I'm, uh, I'm changing what I'm using. To, to delete an object, I just change the ID to zero. And so when I scan through the list of the, the file with nodes, I'll say, you know, first read the size, then the read the ID. If the ID is zero, I know just to, to skip the, over that many bytes of information to get to the next one. Uh, I mean, using, uh, what they call Zoom 11, which is, splits the world into, into two to the 11th. Uh, so 2000, 2048, uh, let, let, groups of latitude in 2048, groups of longitude. So for, for, you need 4 million tiles to store the entire world at Zoom 11. And then I'm going up to Zoom 16 for, uh, high density areas. So we're talking about millions of tiny little files here.  Uh, I wound up, uh, needing to tune the file system as you're probably not surprised. Um, and I wound up being EXT from the experimentation that was done. EXT 3 actually wound up being one of the better file systems to use. EXT 4 had some advantages but it wasn't stable enough at the time the, the testing was done. And to, uh, since I don't want to have, uh, 32 million files or whatever in a single directory, I'm using the least significant bits of the, uh, both the tile X and tile Y as, you know, to decide which directory to store the file in.  But if you just have the latitude and longitude you have to figure out what Zoom that date, piece of data will be in. And so I have an index of which, which tile is at which Zoom. Because I'm splitting, you know, when a Zoom 11 tile gets more than so many nodes in it, it'll be split into four Zoom 12 tiles. I, I have to have an index to indicate what, uh, Zoom H particular L is. So I can compute which tile it would be at Zoom 15. And because Zoom 16 is the maximum I'm using, I, I don't have to store the, uh, at the full Zoom that I, because if a, if I had a Zoom 15 tile I indicate that this, this tile is stored at Zoom 16, well all, all the, all four tiles that are part of that Zoom 15 tile are stored at Zoom 16. I'm storing the Zoom level as a single byte despite the fact that that's inefficient again. It's actually about three bits worth of data. And so, uh, the Zoom index winds up taking a gigabyte. It's a slightly sparse file, but not very. So a little bit of space is saved by, uh, the fact that, uh, I'm using zero to store that the tile is at Zoom 11. And the fact that if you have so many consecutive zeros in a file and, and don't actually write the, the zero to the file, it actually, it, uh, Linux will not use the disk space to store that set of zeros. Okay. For all the other indexes, I'm, I'm just storing the Zoom 16 tile number. And I can use the Zoom 16 tile number to figure out what the, uh, Zoom, the Zoom is for that particular tile. And I use the, uh, ID as the index into the file. I multiply it by four because it takes four bytes to store the 16 bits X and 16 bit Y of each particular tile. Okay. Um, updating, uh, deletes are handled by, by making the ID zeros I mentioned before. Updates are handled by zeroing the ID and adding the new entry to the end of the file. Um, that means that there's garbage, uh, created. And I, I'm, keep a, an, a, uh, live, live, live, live, uh, list of the tiles that need to be garbage collected and will garbage collect a certain, up, up to a certain number of tiles per minute. So I, I, when, when the, uh, updating is very busy, it winds up having a backlog of stuff to garbage collect.  And fairly frequently, a, uh, once one update is done to a tile, another update will be done to the tile, now the next minute. So I don't, so if I keep garbage collecting the same tile over and over every minute, it's kind of inefficient. And when I, when I create a new node, uh, tile is split between, into four tiles of the next zoom level, if, uh, if there's more than four kilobots of data, data in that, uh, node file. And of course it's not already at zoom 16. Okay. Um, I pre, on updating, I process all the node creates, then way creates, then relation creates, then relation deletes, way deletes, and then node deletes. So that way, I don't have inconsistent data. Because if you deleted the node before the way got deleted, it creates inconsistent data. That's all I have prepared. Uh, are there any questions? Is there an audience mic available? Well, it's, it's being recorded. So the, all right. One, test. Okay. I can't hear anything. Okay. Yeah. So you say about, uh, talk about packing and unpacking. Uh, is the data, uh, can you restore the actual planet, planet database from that format? Or is it loss, lossy? Because you convert these, uh, floating points, coordinates to integers? I don't have full accuracy on the, the, uh, latitude and longitude, but it winds up that, that the way they're storing it in SQL is basically the same technique. And so, I'm not losing any more data than, than has already been lost. Uh, I am losing the change set information and the user information. Okay. So I cannot download data to the editor from that server and then later upload it to the main server. Um, the version, okay, uh, one, one thing that I should have been clear about is the version, this is the version of Trappy that I'm working on rather than the version that's currently, uh, live available. The version that currently live, that's live and available is not storing the version number. And it also is filtering the tags based on a lot, it was primarily, it's primarily used by the tiles at home, uh, data renderer. There's a lot of, a lot of common tags that, that are just not of interest. And before I figured out how to store these tags as completely as I have now, uh, it was taking a lot of disk space just to store created by tags and so on and so forth. Okay. But it, it would be really interesting to have a real, uh, mirror for the real database because at the moment if the real database is down you pretty much cannot do anything. Yes. Um, it, this, this, uh, should in theory be able to handle the, uh, storing enough data to do the edits. However, the current, the, there's a problem of the hourly or the, the minutely change files are not reliably capturing all of the changes. And unfortunately, I can't do it if, if the data isn't being passed to me. Okay. I didn't know about that. Yeah. It's a problem of, uh, when the change set spans too long of a time the way the minutely, minute changes are generated. You can have a way and it doesn't have all, it misses some of the node creates that are part of that way. And yeah, it's, it's a known problem and it is being worked on, but I'm not sure when that's going to be fixed. Actually I'm winding up using the minutely change files that are a half hour behind which have fewer of those problems, but it still winds up that, that there's still some missing, uh, data. So I, we can use it for, for rendering and so on and, and things that don't have to have 100% of the data. But unfortunately it is still not reliable and that's not. Okay. Yeah. Thanks. Okay. Any other questions? Oh, I suppose I should have mentioned things like, uh, the, you know, the, the original version of Trappy, uh, that, that did the tag filtering was winding up, uh, storing the entire, uh, database in about 15 gigabytes of disk space. Um, the current version of Trappy that I'm running, that I'm running at home but is not running live anywhere else yet is, uh, storing in about, uh, I think it's something like 22 gigabytes. So it's certainly, it's not as an efficient format as the B-Zipped, uh, file but it's a lot more randomly accessible and because it's indexed by the tile and most of the data, the, the data queries we're getting are by, uh, location. I don't give me all the data around this area. I'm actually returning too much data because I'm rounding up the equate, request to, uh, the, the tiles which is one of the reasons that I'm keeping the tile files so, so small is so I don't retain, return way too much data because, uh, the network transmission costs can, you know, the, the time and, and, uh, there was a, there was a small, small period of time when, when, uh, one of the Trappy servers had was paying per, uh, traffic volume and it wound up being way too expensive even, even the way I was doing it. Oh, um, a, a lot of these type of programming techniques are really pretty old but most, most of the current crop of, uh, programmers don't seem to be taught them because the, you know, the, uh, you know, disk is cheap and, and, and, uh, memory is cheap so why do you need these? Well, if you, in a lot of cases you do need them and, um, embedded programmers are obviously quite familiar with, uh, packing data into small spaces. Okay. Well, if there's no more questions, uh, thank you.


When we're trying to solve the eigenvalue eigenvector problem, we can find the eigenvalues by solving the characteristic polynomial, and we can find the characteristic polynomial by evaluating the determinant of a minus lambda i. But finding the determinant of a matrix is hard! Remember, any method that requires computing determinants is going to be computationally expensive, and in general, we should always ask, is there a better way? So let's consider this. Suppose a is an n by n matrix, and v is any non-zero vector of the appropriate size to be repeatedly left multiplied by a. Then there is a least value k for which the set v, av, a squared v, and so on, is dependent. And that's because since v is in Rn, then any set of n plus 1 vectors must be dependent. Now, we'll form a minimal set of dependent vectors, and we can do that as follows. The set consisting of just the vector v is necessarily independent, so we'll add av to our set. If the set v, av is dependent, we can stop. But if the set is independent, we'll add a squared v to our set. And if the set v, av, a squared v is dependent, we can stop. Otherwise, lather, rinse, repeat. And eventually, we'll get to a set where when we add akv, we now have a dependent set. Since the set without akv was independent, we know there are non-zero values a0 through ak minus 1 for which this linear combination is equal to 0. And the important thing here is that since akv made the set dependent, we can guarantee that it's going to be included in the linear combination. And we'll say that v is the seed that gives us the minimal polynomial, which is the polynomial formed using the coefficients of this linear combination. So for example, let's find a minimal polynomial for this matrix with a seed vector, oh, I didn't know how about 1, 0. So we'll find our vectors. v is just our seed vector 1, 0. We'll find av. And so maybe we're lucky. And the set of these two vectors is dependent. And so we can check for the independence of the set of vectors v, av. Letting our vectors be the columns of a matrix and reducing the matrix to row echelon form gives us, OK, that's not too exciting. But the important thing here is that we have no free variables. And so we know that our set of vectors is independent. No, no, we wanted the set to be dependent. So we go on to the next and find a squared v. And that's a applied to av, which is now we check for the independence of the set of vectors v, av and a squared v. So again, letting our vectors be the columns of a matrix and reducing the matrix to row echelon form gives us, again, not a lot of excitement here. But we do see that x3 is t is our free variable. And we can parameterize our solution. And we'll let t equal to 1, which will give us x1 equals minus 8, x2 equals minus 2.  And we have a corresponding minimal polynomial. Now there are some efficiencies we can have here. In practice, we don't have to check our set every time. If v is in Rn, then any set of n plus 1 vectors is guaranteed to be dependent. And so we can just form our set v, av, a squared v, and so on, be the columns of a matrix and row reduce. And the first free variables correspond to the first vector that gives us a dependent set. So for example, the matrix 2503, starting with our seed vector 1, 0. Since v is in R2, it's guaranteed that the set of vectors v, av, and a squared v will be dependent. So let's find those vectors, av is, and a squared v is. We'll let these be column vectors and row reduce. And so x2 and x3 are free variables, giving us a parameterized solution. Now remember our goal is to find a minimal polynomial, a least degree polynomial. And so if x3 is anything, we'll have an a squared v. So let's let t equals 0 and s equal 1.  And so we have a minimal polynomial minus 2 plus x. Or we could take a 3 by 3 and we can pick any vector we want as our seed. So let's pick, no, no, God, no. How about this one? So we find av, a squared v, a cubed v, and letting these be column vectors and row reducing. We find that x4 is our free variable and we can parameterize our solutions. And if we let t equals 1, we'll get a set of solutions. A linear combination equal to 0 and a corresponding minimal polynomial.


So the last thing that von Karman calculated with his momentum integral analysis was the friction coefficient. And the friction coefficient, just like any of the coefficients typically that we use in fluid mechanics, it was 2 times tau wall divided by rho u out of the square. So basically the dynamic pressure, 1 half rho u squared in the denominator. And what he did is he substituted the value for the wall shear stress that he got from the control volume analysis. And he also substituted in here his quadratic velocity profile. And in doing that, he came up with this for the friction coefficient. So we have a few things here, u naught, u naught that cancels. We have a mu over rho, and that is our kinematic viscosity. And then finally what we have is we have delta, and delta is the boundary layer thickness. So what he then did is he took the boundary layer thickness that he just calculated, that we looked at in the previous section. So let's introduce that and see what we get for the skin friction coefficient. So that is what von Karman ended up with for the friction coefficient. So you can see he was able to get pretty far using momentum integral analysis, a very simple tool that we have learned in this course. The only approximation that he had to make in going through this analysis was the velocity profile itself, and for that he assumed it to be a quadratic function. And that was really the only place where there was an approximation made, and we'll see that that was a bit of an off approximation, but it wasn't too far off, but it enabled him then to get the delta, so the growth of the boundary layer thickness, as well as the friction coefficient, two very important engineering parameters. So what we'll be doing in the next segment, or next lecture I should say, is we'll be looking at the technique that Prandtl came up with, and actually it was his graduate student Blasius, who came up with a differential equation. He took Navier-Stokes and made some approximations, the boundary layer approximations, and ended up with the set of equations that he integrated by hand, and got his PhD for that. But it gave him a relationship for this, as well as this, and what we'll do is we'll compare that to the results that von Karman was able to obtain. So that is the Karman integral method. What we'll do in the last segment in this lecture is just look at the two definitions, one being momentum thickness, and another one is displacement thickness, which are quite often used to characterize the shape and provide a parameter for shear layers in general, but specifically for wall-bounded shear flows or boundary layers that we're looking at in this lecture here. So that's how we will close the lecture, and then we'll move into Prandtl's analysis in the next lecture.